Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Custom Connector: Defining "Grant Type" for Generic OAuth 2 security

I'm using a Postman v1 file to setup a Custom Connector. My API uses OAuth 2.0 with a username, password, client id, and secret...and requires the "grant type" parameter in the authentication request URL to be set to "password". The specific error message provided by my web server is:

{"error_description":"Missing grant_type parameter value","error":"invalid_request"}

How can I set the grant type to password and define a username & password in Flow for a Custom Connector? This is used by the API as a bearer token has to be included in the authorization header of all API calls.

Community Support Team
Community Support Team

Re: Custom Connector: Defining "Grant Type" for Generic OAuth 2 security

Hi jimmyg,


Have you seen this doc about how to register custom connectors in Microsoft Flow? Please follow the steps in this doc to create the connector:


Please check your Swagger file and make sure you have specified all the required parameters.

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: Custom Connector: Defining "Grant Type" for Generic OAuth 2 security

Hi Mabel,


I'm using a Postman v1 file, not Swagger. I'm not sure of any way to define this info in the Postman file, but it does work correctly in the Postman app.


Based on what you wrote, I created a Swagger v2 file with the following security parameters:


  "host": "",
  "basePath": "/dev/v1",
  "securityDefinitions": {
    "auth": {
      "type": "oauth2",
      "flow": "password",
      "tokenUrl": "",
      "refreshUrl": "",
      "scopes": {},
      "x-skip-client-authentication": false


When I try to create a custom connector in Flow using this file, I get the following error:


The request failed with error: '{"Code":"ValidationError","Message":"One or more fields contain incorrect values:","Target":null,"Details":[{"Message":"One or more fields contain incorrect values:"},{"Code":"ValidationError"},{"ErrorEntity":{"ExtendedCode":"Entity field: apiDefinitionUrl","InnerErrors":[{"Parameters":["contract","apiDefinitionUrl"],"Code":"ValidationError","Message":"Parsing error(s): JSON is valid against more than one schema from 'oneOf'. No valid schemas. Path 'securityDefinitions.auth', line 4789, position 13."}],"Code":"ValidationError","Message":"One or more fields contain incorrect values:"}}],"Innererror":null}'. The tracking Id is '7dd5cf3e-7b8d-4074-a1d5-2bf76e61d7eb'.

Any suggestions for what is going wrong?




Level: Powered On

Re: Custom Connector: Defining "Grant Type" for Generic OAuth 2 security

Did you get anywhere with this? I'm having a similar problem where I want to use OAuth2 Client Credentials. Flow has the "Generic Oauth 2" auth type but Oauth2 isnt generic, different flavours require different params.


It looks like "Generic OAuth 2" only supports Authroization Code Grant, but I cant find this explicity stated anywhere in the docs.

Helpful resources


Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.


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.


Flow Community User Group Member Badge

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


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 350 members 5,085 guests
Please welcome our newest community members: