Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Salesforce failed to complete task: Message: A task was canceled.

When I put a trigger on any table, the trigger fires then I get this error:


  "error": {
    "code": 502,
    "source": "",
    "clientRequestId": "861121dd-5ac5-4217-ac09-ba2556945ff4",
    "message": "BadGateway",
    "innerError": {
      "status": 502,
      "message": "Salesforce failed to complete task: Message: A task was canceled.\r\nclientRequestId: 861121dd-5ac5-4217-ac09-ba2556945ff4",
      "source": "mscorlib",
      "errors": []


Then I get this error on the front page:

Community Support
Community Support


Hi @Xerxel ,


The error message mentioned that the current task has been cancelled, so it cannot be completed, I think the status of the task must be pending, it can be set to complete.


Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Xerxel , from the telemetry data, I can tell that all of the requests from Power Automate to the Salesforce server are getting timed out after waiting for 100 seconds. So some issue appears to be on Salesforce server end.

Power Automate
Power Automate

@Xerxel , did you go through the known issues and limitations documented at (especially those copied below) and ensure that the Salesforce service is properly configured to allow Power Automate integration?


  1. Salesforce session settings can block this integration. Please ensure that setting "Lock sessions to the IP address from which they originated" is disabled.
  2. Salesforce API access should be enabled. To verify access settings, go to profile settings for the current user and search for "API Enabled" checkbox.
  3. Note that Salesforce trial accounts do not have API access.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,963)