ConnectionAuthorizationFailed Error When Calling Power Automate API

Adrián Tornal 20 Reputation points
2024-08-06T09:02:56.46+00:00

Good morning,

I am working with Azure Power Automate flows and trying to get the execution status of the created flows through an Azure API.

For the call, we use the endpoint:

https://api.flow.microsoft.com/providers/Microsoft.Flow/environments/{environment}/flows/{flow}/runs?api-version=2016-11-01

Adding as authentication a token obtained from Azure.

The complete curl command is:

curl --location 'https://api.flow.microsoft.com/providers/Microsoft.Flow/environments/{environment}/flows/{flow}/runs?api-version=2016-11-01' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer Token

When making the API call, we encounter the following error:

{     "error": {         "code": "ConnectionAuthorizationFailed",         "message": "The caller object id is 'aa177ce7-b66c-41c1-b438-05a81c56eae1'. Connection '1f92fc3b-bf4d-4980-8e16-d92973913aba' to 'shared_logicflows' cannot be used to activate this flow, either because this is not a valid connection or because it is not a connection you have access permission for. Either replace the connection with a valid connection you can access or have the connection owner activate the flow, so the connection is shared with you in the context of this flow."     } }

And we are unable to get any response.

Points to consider:

  • In "app registration," we have an app with sufficient permissions to interact with Power Automate.
  • The flow does not have any connections, it is a simple flow created for testing purposes.
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
42,885 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmaranS 7,255 Reputation points Microsoft External Staff
    2024-08-06T09:10:39.26+00:00

    Hi Adrián Tornal,

    Power automate is not currently supported here on Q&A. They're actively answering questions in dedicated forums here.

    https://powerusers.microsoft.com/t5/Microsoft-Power-Automate/ct-p/MPACommunity

    Please "Accept Answer" if the answer is helpful so that it can help others in the community.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.