Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Using OAuth with password grant type

(1) ShareShare
ReportReport
Posted on by 36
I have an API I am trying to build a connector for. The API uses OAuth, but requires the password grant type. I can’t see an option for this when setting up the security settings on the connector.

I can set up the connector as having no authentication and then create an action that calls the token endpoint and I successfully get the access token back, but I then can’t use that to set the Authorization header on subsequent actions (and my username and password would become part of the flow as well, which isn’t great)

Is there any other way of approaching this?
  • seriewe Profile Picture
    seriewe 4 on at
    Re: Using OAuth with password grant type

    Hi @sammysword  nope, https://powerusers.microsoft.com/t5/Using-Connectors/Using-OAuth-with-password-grant-type/m-p/2569310/emcs_t/S2h8ZW1haWx8bWVudGlvbl9zdWJzY3JpcHRpb258TFJTWkExRU1BVTIzT0R8MjU2OTMxMHxBVF9NRU5USU9OU3xoSw#M21507 It looks like just "authorization code flow" or API-Key is supported by custom connectors supported. 

  • sammysword Profile Picture
    sammysword 74 on at
    Re: Using OAuth with password grant type

    Hello @seriewe 

     

    I seen you'd commented on this a few months back. I am facing the same issues. Did you resolve this?

  • seriewe Profile Picture
    seriewe 4 on at
    Re: Using OAuth with password grant type

    Hi,
    it's been a few years, but I'll try my luck anyway. Could anyone use the password flow?
    If I modify the Swagger definition, I can change it to password flow
    securityDefinitions > oauth2-auth > flow
    but it leads to an error, which doesn't say exactly what the problem is.

    seriewe_0-1695569369344.png

     

  • Jermeel Profile Picture
    Jermeel 8 on at
    Re: Using OAuth with password grant type

    Bump.  I am having the same issue.  I need to pass a "type" parameter to my authorization URL.  I cannot get past the authorization stage for my custom connector without this.  Cat Sad

  • Re: Using OAuth with password grant type

    Has there been an update to this issue. I am also working on building a Custom Connector for an API that requires the grant type to be set. It seems to be a common requirement on APIs.

  • v-yamao-msft Profile Picture
    v-yamao-msft on at
    Re: Using OAuth with password grant type

    Hi @MarkData8 ,

     

    From the doc on creating a custom connector, it seems that there is no option for requiring the password grant type:

    https://docs.microsoft.com/en-us/connectors/custom-connectors/define-blank#specify-authentication-type

     

    I will help do more research on this issue and then back to you.

     

    Best regards,

    Mabel

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard

Featured topics