Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Custom connector - changes to swagger editor security settings not saved

I am trying to create a custom connector to an existing API which uses oauth2 with the application flow type.

In the security tab there is no option to change the flow type.

In the swagger editor I can change the flow type and remove the authorization url:

type: oauth2
flow: application
tokenUrl: https://.../connect/token
scopes: {...: ...}

After these changes I can succesfully authorize with the api using the authorize button.

The problem is that these changes are not saved; when I switch away from the swagger editor my changes are reverted. 

I've also tried using the update connector button from the swagger editor, but also no luck.


One other thing I have tried is creating a collection in postman describing the api with the correct authentication settings, but these settings are not used by the create a custom connector wizard.



Hi @NicoD 

You will need to use the `Update Connector` button to save changes. I would recommend you to use the CLI tool we have written. This give you a bit more power to control the development. Look at this documentation here:
By using the CLI you can save the Swagger changes locally and manage using a source control. You can then directly publish these changes to flow.


If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE 👍.

Frequent Visitor

Hi murshed,

Thank you for your reply. At least it helped me look into the right direction. 

1) Whenever I press update the underlying specification seems to change in some strange way: the oauth settings seems to be forced to use accessCode flow instead of application flow.

2) When I create or update the connector using the paconn cli tools I  get a json validation error:

"code": "SwaggerParsingError",

        "message": "JSON is valid against no schemas from 'oneOf'. Path 'securityDefinitions.oauth2_auth'."

3) Some other strange thing that happens is that the security definition

"securityDefinitions": {

        "oauth2": {

Often gets changed to


While searching on this error message I stumbled upon:

And I also found:


So I'm afraid it’s not going to work. The first link seems to contain a workaround. Hopefully I can get it to work with that.

Helpful resources

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

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