I'm using PowerAutomate, and I'm following this guide to trigger a desktop flow run using web apis, I can successfully run most GET calls in the guide, but when I trigger a desktop flow run, I get this error:
{\"error\":{\"code\":\"DesktopFlowsConnectionAccessFailedForDesktopFlowConnector\",\"message\":\"User with object identifier 'xxxx' does not have access to the connection 'yyyy' for the Desktop Flows connector.\"}
I couldn't figure out how to solve this issue, or establish this access.
I registered one Azure AD application and added same API permissions as below:
In my case, I used username password flow to generate access token via Postman with below parameters:
Response:
You can decode the above access token in jwt.ms website to check
aud
andscp
claims like this:Now, you can use this access token generated by username password flow to trigger a desktop flow.