Showing results for 
Search instead for 
Did you mean: 
Advocate IV
Advocate IV

Error 520 - API Hub token exchange internal server failure.

A flow in our environment is reporting the following error message:

"There's a problem with the flow's trigger."


Digging into the details gives the following:

{ "Message": "API Hub token exchange internal server failure.", "SourceUri": "*<shortened>*/exchange", "IsCachedResponse": "false" }


Refreshing the connection does not make it go away. I copied the flow and use that (that works) but this is not a reliable solution.


I noticed a number of similar posts here and I contacted support but I want to get the message out there that these issues still occur.

Advocate I
Advocate I

I have the same error warning in one of my flows.


The trigger for this flow is: When a file (in a sharepoint document library) has been created (only file information).

This has appeared only recently and I did not change anything since then within the flow.

What I did change is add the feature information management policy to the sharepoint to which the trigger points.

Is this related?


Please advise.


Frequent Visitor

I have identical problem, trigger is "When an item is created" in SQL database.

MS, please take a look on that. Would be also great if owners of the flow will be notified in case of issues.




No information management policy applied here. 


I got the following non-response for my support call:



As error 520 is an intermittent error and it may come in the specific trigger due to  sever issue or while connecting to the API. Making the copy of the flow or re-add the trigger will solve this issue.


You don’t need to monitor the flow to see for it.


Frequent Visitor

Ran into the same problem right now. Trigger is "When a file is created (properties only)".


Error just show as "520".


Any update on this?


Thankfully this happened during testing. Not going live with this when there are unknown errors.


Update: Not sure, but it looks like the Flow completely breaks when this error occurs. Not even editing and saving it helps. Seems weird because the error sounds more like a temporary problem.

I am interested in seeing follow-up on this issue.  It happened to me yesterday.  A Flow that successfully ran several previous days failed yesterday with the same 520 error, "API Hub token exchange internal server failure."  The flow does not appear as a failed execution, but rather, a message comes up after some time saying "There's a problem with the flow's trigger."  The trigger was "When a file is created" using the data gateway to look at on-premises files.  

Skilled Sharer
Skilled Sharer

me too, just received this error...   When a Task is Completed trigger.  

Any Progress on this? We went live last monday with out any issues and today we started having this issue in prod. Can you please let us know the root cause for this?

@Brice235i wrote:

me too, just received this error...   When a Task is Completed trigger.  


We've raised a premier ticket,...  has sucessfully progressed past first level support.  I beleive it is now going to the engineers...  Waiting............

@Brice235i  : Just wanted to check if  you got an update on that ticket? I am facing the same issue as well.

Helpful resources

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (16,434)