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?
The supported authentication method are listed in the document below:
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.
This also happens for me with OAuth2 Client Credentials
"description":"client credentials grant flow",
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?