oauth-2.0power-automate

Add OAuth authentication for HTTP request triggers


Microsoft added a new capability - Add OAuth authentication for HTTP request triggers.

I've been trying to trigger the flow by using the @azure/msal-browser package and passing the accessToken received in the flow in the Authorization header (i.e. Bearer {accessToken}).

But I'm getting an error:

code: "MisMatchingOAuthClaims"
message: "One or more claims either missing or does not match with the open authentication access control policy."

What am I doing wrong?


Solution

  • I could get the token and trigger the OAuth HTTP URL successfully! Please follow the following steps!

    Type: OAuth 2.0

    Grant Type: Client Credential

    Access Token URL: https://login.microsoftonline.com/{{TenantID}}/oauth2/v2.0/token

    Client ID: {{Client ID}}

    Client Secret: {{Client Secret}}

    Scope: https://service.flow.microsoft.com//.default

    pay attention to the "//" in the Scope image