404 Error from token exchange on Update from Logic App with Service Principal

Rob Joosen 86 Reputation points
2022-12-05T19:50:52.557+00:00

Suddenly my logic apps give these problems:

{
"status": 404,
"source": "https://logic-apis-westeurope.token.azure-apim.net:443/tokens/logic-apis-westeurope/commondataservice/<<GUID>/exchange",
"message": "Error from token exchange: The connection (logic-apis-westeurope/commondataservice/<<GUID>>) is not found. Please create new connection and change your application to use the new connection."

Is have re-created the connection several times but this problem keeps popping up. The strange thing is taht it appears on the Dataverse Update Connector, but not on the Dataverse Trigger.

}

Any ideas?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,113 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sonny Gillissen 3,351 Reputation points
    2023-07-12T20:38:58.79+00:00

    Hi Rob Joosen

    Thank you for reaching out on Microsoft Q&A!

    I’ve seen this behaviour before when something happened with the connection file, like redeployment or recreation. This is due to caching. Even though the Logic App has the same configuration file name, it doesn’t see it as being the same (so the old one isn’t automatically replaces with the new, even thought the name is the same).

    To mitigate this issue it helped me to go into the Logic App, change a value so the save button lit up, then changed the value back to what it was before and save again. This wat the cache got flushed and the connection started working again.

    Recreating the connecting isn’t helping, so “tricking” the Logic App is the way to “reconnect” them.

    Please click “Accept answer” if you find this helpful. Feel free to drop additional queries in the comments below!

    Kind regards,

    Sonny

    2 people found this answer helpful.

  2. Thomas Welén 0 Reputation points
    2023-07-12T19:19:21.66+00:00

    I had the same issue and the solution for me was to rename the API connection (deletion of old one and create a new one with another name, via terraform). I had a blob-connection with the same name present earlier in another resource group that was deleted before the new one was created, but this may have been the issue, some sort of caching perhaps

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.