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 Apps
Suggested Answer

Custom Connector

(0) ShareShare
ReportReport
Posted on by 81
Hi,
 
Can anyone point me to the right direction?
 
I am trying to create a custom connector using OAuth 2.0 as the authentication and Azure Active Directory as the Identity Provider.
 
I have successfully created a connection using client id, client secret and tenant id. However, I am getting 401 status code when I tried the operation.
 
What I have done so far:
- Used postman with the same details and successfully connected.
- Created a flow with http request action that requests the token and another http request action for the actual request.
 
Upon inspecting the difference using jwt.ms, the token generated by the custom connector has an audience of https://apihub.azure.com.
 
As per copilot, this is the architecture I need to follow:
 
 
Thanks in advance!
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    2,126 on at
    The 401 error occurs because the custom connector is acquiring a token with the audience set to https://apihub.azure.com, which is not
     
    accepted by your API.
     
    This happens because Power Platform acts as an intermediary when using OAuth.
     
    To fix this, you must configure your API in Azure AD with a proper Application ID URI, expose scopes, and update the custom connector to
     
    request a token for your API (not API Hub). y
     
    Alternatively, you can bypass the connector OAuth and manually acquire and pass the token using HTTP actions.
  • bebeben10 Profile Picture
    81 on at
    Thanks for your reply @11manish.
     
    Could you see anything that I am missing or doing anything wrong in terms of configuration of the API based on the screenshots below?
     
     
     
     
     
     
    Also, if you could kindly expound further the alternative option? Bypassing the OAuth and manually acquiring the token.
     
    Thanks!
  • 11manish Profile Picture
    2,126 on at
    In first look, it is fine.
     
    You can use Azure Function as alternative where every activites related to Auth should implement under the azure function. 
     
    You just need to consume it.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 936

#2
11manish Profile Picture

11manish 628

#3
Valantis Profile Picture

Valantis 604

Last 30 days Overall leaderboard