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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom Connector to Az...
Power Apps
Answered

Custom Connector to Azure API using Oauth 2.0

(0) ShareShare
ReportReport
Posted on by 9

I'm attempting to integrate my PowerApps UI application with an Azure Data Factory instance using the Azure Service Management API (https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}?api-version=2018-06-01).  I understand that I need to create a custom connector in order to do this and that I'll need to use Oauth 2.0 for authentication.  I've registered my PowerApps application in my company's Azure Active Directory on our portal so that I have a client_id and client secret for it.  I'm not a Web developer, so Oauth 2.0 authentication is new to me, but I've learned the basics of it. 

I completed the General tab with the schema info below: 

CycladelicT_1-1649720641666.png

 

It's on the Security tab of my custom connector that I'm not quite sure which Identity Provider I should use, either Generic Oauth 2.0 or Azure Active Directory to access the Azure Service Management API.  I started with Generic Oauth 2.0 and here's a screenshot of everything (minus the client ID and secret info).

CycladelicT_0-1649720186057.png

I've completed the Definition tab with no issues and then I proceed to the Test tab.  And that's where it all goes bad 😄

 

I'm getting this:

Body:

{
"error": {
"code": "AuthenticationFailed",
"message": "Authentication failed."
}
}

 

Headers

{
"cache-control": "no-cache",
"content-length": "76",
"content-type": "application/json; charset=utf-8",
"date": "Mon, 11 Apr 2022 23:47:16 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000; includeSubDomains",
"www-authenticate": "Bearer authorization_uri=\"https://login.windows.net/335a6d75-c3eb-4b1a-ac08-d49338816ca0\", error=\"invalid_token\", error_description=\"Could not find identity for access token.\"",
"x-content-type-options": "nosniff",
"x-ms-apihub-cached-response": "false",
"x-ms-apihub-obo": "true",
"x-ms-correlation-request-id": "86db93c0-5b2a-4f32-85fc-0ae2e9740885",
"x-ms-failure-cause": "gateway",
"x-ms-request-id": "86db93c0-5b2a-4f32-85fc-0ae2e9740885",
"x-ms-routing-request-id": "NORTHCENTRALUS:20220411T234717Z:86db93c0-5b2a-4f32-85fc-0ae2e9740885"
}

 

One additional note: Prior to creating this custom connector, I verified that I can call the Azure Service Mgmt API (using Postman) and change objects within an Azure Data Factory instance using it.

 

I've tried multiple different permutations and combinations on the Security tab.  I've even tried Azure Active Directory as the Identity Provider as well, with the same or similar results.  At this point, any assistance is greatly appreciated 😬

 

Categories:
I have the same question (0)
  • Verified answer
    CycladelicT Profile Picture
    9 on at

    This problem has been resolved.

  • remyadeepu0206 Profile Picture
    2 on at

    Please share the solution to connect APIM and Powerapps with oAuth token policy showing Unauthorized

    .

  • phbronson Profile Picture
    8 on at

    What was your solution?

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 105 Most Valuable Professional

#2
Haque Profile Picture

Haque 77

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 70

Last 30 days Overall leaderboard