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.

Skilled Sharer
Skilled Sharer

Just had an update on the premiere support ticket I raised: 

"our PG team we have asked the  SharePoint team to look into the issue as the clientRequestId for the trigger where PG seeing sharePointAdapterException is causing the issue and need their intervention to fix this."

I haven't read all the posts on this thread (there are so many!), but here is the info I got from my talk with Microsoft support today and my related thoughts:

  1. Microsoft says there is a known issue where authorization token on a data connection over the gateway can become corrupted.  Engineers are aware and working on it.
  2. Microsoft suggests two temporary workarounds for recovery.  My preferred solution is to recreate the connection and change the flows to use the new connection.  The message to fix the trigger does not go away until the flow executes the next time.  The other solution is to copy the flow (save as).  Personally, I don't want a collection of broken flows and a challenge figuring out which are the working ones.
  3. There is still an issue in discovering that the issue exists in a timely manner.  No email notice is sent because the flow never executes due to the trigger problem.  If I happen to notice that something didn't happen that should have, I can go into the run history and see if the fix trigger message exists.  Unfortunately, that is too late to recover in time for the dependent processes to work.  My idea is to create a heartbeat solution.  Schedule a flow to create a file over the same connection, which should fail and send a notice.  If I find that it does not, I can create a 2nd flow to watch for that created file, and send email if it does not find it.  


Regular Visitor

I'm also getting this exception intermittently. Is there a resolution for this?

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,992)