Hello,
I tried to cram the whole situation into the title.
When using an OpenAPI definition apiProperties.json with
"securityDefinitions": { "OAuth2": { "type": "oauth2", "description": "OAuth2 Client Credentials", "flow": "application", "tokenUrl": "https://login.vendor.com/as/token.oauth2", "scopes": { "scopedtothis": "Read access to protected resources" } }
I get through the first validation when i am prompted to import my OpenAPI definition. If you dont have a valid schema then you get stopped here is my experience.
However, when registering additional information under Security i am forced to enter all the fields although i dont need them (is my understanding). Fields such as Refresh URL and Authorization URL. As i am using grant-type application (Which is part of OpenAPI 2.0) i do not require an Authorization URL (source). Im inlcuding these sources so that we have some common ground when discussing this. Everything i've stated above is how i've understood things after reading documentations for a few hours today.
And at last the reason im making this post is because i get an error message when trying to register my custom connector implementing OAuth2
What im trying to achieve is working in postman with the following settings for acquiring a token.
Solved! Go to Solution.
Hi @MartinBurman ,
Which service do you use as the OAuth 2.0 Identify Provider?
Could you please share a bit more about the grant-type application that you mentioned?
Based on the issue that you mentioned, I think this issue may be related to the Grant-Type you used as authentication way on your side.
Currently, within PowerApps/Microsoft Flow, if you use OAuth 2.0 as authentication way within your custom connector, actually, it would use Authorization Code as the Grant Type rather than Client Credentials.
If you want to use OAuth 2.0 as authentication way within your custom connector, and use Client Credentials as Grant Type, I afraid that there is no way to achieve your needs in PowerApps currently.
As an alternative solution, you could consider use API Key as Authentication way within your custom connector. Please take a try with the following workaround:
1. Specify "API Key" as Authentication way within your custom connector.
2. Generate an Access Token using Postman (just as you mentioned).
3. Save your custom connector. Go to the "Test" tab in your custom connector, click "New connection", type the following value within the Authorization box:
Bearer Access_Token
Note: The Access_Token represents the Access Token you get from the Step 2. The sample format as below:
Bearer 02989e924bb6245305b13446d6fdfba2af710bad
There is a space between the Bearer and the Access Token value.
Please consider take a try with above solution, check if the issue is solved.
Best regards,
try to set the right setting
i think azure ad in your case
Hi @MartinBurman ,
Which service do you use as the OAuth 2.0 Identify Provider?
Could you please share a bit more about the grant-type application that you mentioned?
Based on the issue that you mentioned, I think this issue may be related to the Grant-Type you used as authentication way on your side.
Currently, within PowerApps/Microsoft Flow, if you use OAuth 2.0 as authentication way within your custom connector, actually, it would use Authorization Code as the Grant Type rather than Client Credentials.
If you want to use OAuth 2.0 as authentication way within your custom connector, and use Client Credentials as Grant Type, I afraid that there is no way to achieve your needs in PowerApps currently.
As an alternative solution, you could consider use API Key as Authentication way within your custom connector. Please take a try with the following workaround:
1. Specify "API Key" as Authentication way within your custom connector.
2. Generate an Access Token using Postman (just as you mentioned).
3. Save your custom connector. Go to the "Test" tab in your custom connector, click "New connection", type the following value within the Authorization box:
Bearer Access_Token
Note: The Access_Token represents the Access Token you get from the Step 2. The sample format as below:
Bearer 02989e924bb6245305b13446d6fdfba2af710bad
There is a space between the Bearer and the Access Token value.
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Thank you for the extensive respone.
That could be an option, and then to also add a separate connector for getting the token in a productionenvironment.
I will mark you answer as a solution since this is not really a part of the original question any more and i think others will find it useful to read our conversation here.
Martin
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
251 | |
250 | |
84 | |
36 | |
32 |
User | Count |
---|---|
337 | |
260 | |
122 | |
72 | |
44 |