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.