cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
duckman
Level: Power Up

Does the Customer Connector support OAuth2 flow: password?

I have a swagger file validated and tested in other apps that I cannot seem to get to work in PowerApps as a customer connector. The cause seems to be the OAuth2 method (i.e. flow: password).   

 

Here is a copy of the working Swagger security definition: 

 

securityDefinitions:
  waoauth:
    type: oauth2
    tokenUrl: https://oauth.wildapricot.org/auth/token
    flow: password
    scopes:
      auto: detect maximum permission

When I attempt to load this into the connector, it demands an authorization and refresh url, but these are not used in this particular method. 

 

When trying to move it forward and save, I get the following error: 

 

"The request failed with error: 'Parsing error(s): JSON is valid against more than one schema from 'oneOf'. No valid schemas. Path 'securityDefinitions.waoauth', line 84, position 16.'. The tracking Id is 'a617692b-8410-4e1f-97c1-23293ecd9bb0'."

 

Is there any way around this? 

5 REPLIES 5
Community Support Team
Community Support Team

Re: Does the Customer Connector support OAuth2 flow: password?

Hi @duckman,

 

The supported authentication method are listed in the document below:

Register and use custom connectors in PowerApps

"

using one of the following authentication mechanisms. You can allow unauthenticated access to your APIs, but we don't recommend it.

"

Your swagger definition seems to be fine, I think the issue should be the server authentication mechanism.

Consider verify that part.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
duckman
Level: Power Up

Re: Does the Customer Connector support OAuth2 flow: password?

The error occurs at parsing by MS. Tests via other systems show this Swagger definition to connect without issue. 

awildash
Level: Powered On

Re: Does the Customer Connector support OAuth2 flow: password?

This also happens for me with OAuth2 Client Credentials 

 

"securityDefinitions":{
"client_credentials":{
"type":"oauth2",
"description":"client credentials grant flow",
"flow":"application",
"tokenUrl": <redacted>,
"scopes":{
<redacted>
}
}
}

 

The issue is with the front end form as pointed out by the OP. It forces you to supply an authorizationUrl but that isnt part of the OpenAPI spec when using the application flow, so it fails validation. The refresh and authroization URL fields shouldnt be mandatory.

 

Surprised this issue seems to have been around for so long, unless its the intention that the connectors dont support Password/Client Credentals grant types? @v-micsh-msft can you confirm which auth flows are supported by the Generic OAuth 2 auth?

Patening
Level: Power Up

Re: Does the Customer Connector support OAuth2 flow: password?

Is there already al solution for this problem without using Azure?

awildash
Level: Powered On

Re: Does the Customer Connector support OAuth2 flow: password?

Dont believe so. Our MS representative believed this was working as expected (i.e. Password and Client Credentials grants arent meant to be supported).

 

My way around it would be to use an HTTP Trigger Azure Function and use the OOTB HTTP connector to send data to it.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 227 members 4,585 guests
Please welcome our newest community members: