web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Invalid audience error...
Power Automate
Unanswered

Invalid audience error using Power Automate custom connector OAuth token with Microsoft Graph

(0) ShareShare
ReportReport
Posted on by

Thank you for your support.
I have a question about integrating a Power Automate Custom Connector with the Microsoft Graph API.

 

What I want to achieve

 

I would like to pass an Entra ID access token obtained via a Power Automate custom connector to my custom API, and then use that token to call Microsoft Graph API (mainly to retrieve documents from SharePoint).

 

Architecture / Flow

 

I implemented the solution with the following flow:

 
  1. Perform OAuth 2.0 authentication in Power Automate (Custom Connector)
  2. Obtain an access token (JWT) from Entra ID
  3. Send a request from the custom connector to my custom API (via APIM) with:
    ・Authorization: Bearer {access token}
    ・API Key
  4. In the custom API, use the received token to call Microsoft Graph API
 
 

Issue

 

When calling Microsoft Graph API from the custom API, the following error occurs:

 
{
  "error": {
    "code": "InvalidAuthenticationToken",
    "message": "Access token validation failure. Invalid audience."
  }
}
 

Investigation

After inspecting the access token issued for the custom connector, I confirmed the audience (aud) claim is:

    - "https://apihub.azure.com"

 

On the other hand, I understand Microsoft Graph requires the following audience:

 

    - "https://graph.microsoft.com"

 
 

Therefore, I believe the authentication error is caused by an audience mismatch.

 
 

Current understanding

I think the token obtained by the Power Automate custom connector is intended for the Power Platform execution infrastructure (apihub), and cannot be used directly with Microsoft Graph API.

 
 

Questions

I would appreciate your guidance on the following:

 

â‘  Recommended architecture

For this scenario (Custom Connector → Custom API → Graph), what is the Microsoft-recommended implementation pattern?
Examples:

  • Having the custom API acquire a separate access token for Graph
  • Using the On-behalf-of (OBO) flow, etc.
 

â‘¡ Token acquisition via custom connector

Using only OAuth authentication in a Power Automate custom connector, is it possible to obtain an access token whose audience is Microsoft Graph (https://graph.microsoft.com)?

 
 

Expected outcome

I would like to clarify one of the following:

  • Whether this architecture is technically not viable
  • The correct design pattern to implement this scenario
  • Workarounds (e.g., changing the token acquisition method)
 

Thank you in advance for your support.

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 538

Last 30 days Overall leaderboard