cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

OAuth 2.0 Resource Owner Password Credentials on Custom Connector

Hello,

 

I'm struggling to find a solution incorporating an API into a custom connector, this API uses OAuth 2.0 Resource Owner Password Credentials, also known in Postman as the 'Password Credentials' OAuth 2.0 Grant Type.

See here for more information: https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc

 

The current method from the generic OAuth 2.0 - Generic Oauth 2 Identity Provider only allows for: Client id & Client secret.

This does not grant access to OAuth 2.0 APIs that use a 'Password Credentials' method, using 'Username' and 'Password'

 

Using the 'API Key' method will allow the developer to enter the bearer token into the 'Connection' string, but this does not work long term for expiring tokens and as far as I can tell there is no way to feasibly update the 'Connection' automatically every-time the token expires. In my case that could be every 24 hours.

 

Are Microsoft developers able to add Grant Type as a feature extension / improvement to only allowing the grant type of Client ID and Client Secret? Or is there a known workaround for this situation I am in?

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: OAuth 2.0 Resource Owner Password Credentials on Custom Connector

Hi @RyanW7 ,

Do you want to use the OAuth 2.0 Resource Owner Password Credentials within custom connector in PowerApps?

 

Currently, the OAuth 2.0 Resource Owner Password Credentials is not supported as valid Identifier Provider under OAuth 2.0 authentication way in custom connector within PowerApps.

 

If you want to use the OAuth 2.0 Resource Owner Password Credentials within custom connector in PowerApps, I afraid that there is no way to achieve your needs in PowerApps currently.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

As an temporary solution, you could get the Access Token through the 'Password Credentials' OAuth 2.0 Grant Type in Postman. Then use API Key as authentication way in your custom connector as below:

8.JPG

 

Then when you create a connection to your customer connector, specify the following value for the Authorization header property:

Bearer Access_Token(Get from Postman)

 

In addition, you could also consider use the "Basic authentication" as authentication way within your custom connector instead of the OAuth 2.0. Then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: OAuth 2.0 Resource Owner Password Credentials on Custom Connector


@v-xida-msft wrote:

Hi @RyanW7 ,

Do you want to use the OAuth 2.0 Resource Owner Password Credentials within custom connector in PowerApps?

 

Currently, the OAuth 2.0 Resource Owner Password Credentials is not supported as valid Identifier Provider under OAuth 2.0 authentication way in custom connector within PowerApps.

 

If you want to use the OAuth 2.0 Resource Owner Password Credentials within custom connector in PowerApps, I afraid that there is no way to achieve your needs in PowerApps currently.

 


Correct, that was the reason for my posting this topic

 


@v-xida-msft wrote:

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 


This PowerApps Idea has been now submitted for review

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Custom-Connector-Generic-OAuth-2-0-Password-Gra...

 


@v-xida-msft wrote:

As an temporary solution, you could get the Access Token through the 'Password Credentials' OAuth 2.0 Grant Type in Postman. Then use API Key as authentication way in your custom connector as below:

8.JPG

 

Then when you create a connection to your customer connector, specify the following value for the Authorization header property:

 

Bearer Access_Token(Get from Postman)

 


Correct but as I mentioned in post: This does not work long term for expiring tokens because there is not a way to update the 'Connection' string automatically every-time the token expires, you would need to go in and update it manually ever X amount of time, where most tokens are limited to X hours.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,294)