cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MattDendle
Advocate I
Advocate I

OAuth2 client flow - is it supported in powerapps custom connectors?

Hello All,

 

When using a custom connector, does PowerApps OAuth2 implementation allow for the client/application flow?

 

I can use the accessCode flow just fine, but I cannot use the 'client' flow.  Heres the relevant part of my swagger doc:

 

"securityDefinitions": {
"oauth2": {
"type": "oauth2",
"description": "OAuth2 Application Flow",
"flow": "application",
"tokenUrl": "https://tokenserver/oauth/token",
"scopes": {
"impersonate": "Fully impersonate"
}
}
}

When trying to create this connector, I get the follow error:

 

 

Manage your custom connectors | Microsoft Flow

'Parsing error(s): JSON is valid against more than one schema from 'oneOf'. No valid schemas. Path 'securityDefinitions.oauth2', line 147, position 16.'.
 
Can anyone help?
 
Thanks for your help in advance,
Matt
3 REPLIES 3
v-monli-msft
Community Support
Community Support

Hi @MattDendle,

 

So far, in PowerApps, authentication mechanism OAuth 2.0 is supported for specific services like Dropbox, Facebook, and SalesForce. I saw an idea submitted in the forum and you can vote there:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Oauth2-and-apiKey-support-to-custom-API-endpoint...

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello Mona,

 

Thanks for your reply, but I think it is confusing, and even misleading; Generic OAuth2 is supported for Custom Connectors for use in connecting PowerApps/Flows to custom APIs.  In fact, I have several custom connectors pointing to my custom API using OAuth2 right now.

 

But my question is more specific than this; of the OAuth2 flows, the accessCode flow works great, but I do not seem to be able to use the client/application flow.

 

Can anyone confirm if this is supported?

 

Regards,

Matt

Anonymous
Not applicable

I am getting the same error if I use a FLOW other than IMPLISIT.

In both cases here what is common is that the FLOW is pointing to APPLICATION which is required when the Grant Type is Client Credentials.

I got Swagger validation elswhere!

The request failed with error: 'Parsing error(s): JSON is valid against more than one schema from 'oneOf'. No valid schemas. Path 'securityDefinitions.oauth_2_client_credentials_auth', line 51, position 41.'. The tracking Id is '29510f5e-bcc8-4d0b-a9d4-53e945928d58'.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,966)