web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Help needed authentica...
Power Automate
Unanswered

Help needed authenticating a custom connector that uses a Bearer token

(0) ShareShare
ReportReport
Posted on by

Hello Everyone.

 

I am trying to create a custom connector to an external API (Magento), but I am having trouble setting it up.

 

I can use the Magento API just fine with Postman and post and get a response, which means that authenticatation is successful.

 

I just can't manage to do the same when settings up a Power Automate custom connector.  When I test it, it just says it failed and to try again later.

 

The authentication used for this API is a bearer token, but that doesn't seem to be an authentication option?

 

Via Postman I can generate a bearer token via a client id, client secret and a token authentication URL - how can I get these details into my custom connector settings?

 

For example, if I choose OAuth2:

ianwuk_0-1671524011661.png

I don't know what to put for the three different URLs, or the scope, and the three URLs are required data.

 

Similarly, if I choose API key as the security method and then put in API Key as the label, Authorization as the parameter name, and choose header, when I make a connnection it asks for an API key.  I put in 'Bearer xxxxxxx', where xxxxx is the bearer token and I still can't seem to get it to work.

Any help is much appreciated - thanks!

 

Categories:
I have the same question (0)
  • Amit_Sharma Profile Picture
    1,569 Super User 2024 Season 1 on at

    Hi @ianwuk, may we know the grant type used to generate token in postman? As per my knowledge custom connector only supports the authorization code grant type. If we're using client credentials grant type I will suggest you use HTTP connector instead. 

  • CU-19081228-9 Profile Picture
    on at

    @Amit_Sharma Thanks for replying.  Postman lists grant_type = client_credentials.

     

    It also uses a client_secret and client_id too - does that help?

    So how do I set up a HTTP connector?

  • Amit_Sharma Profile Picture
    1,569 Super User 2024 Season 1 on at

    Hi @ianwuk, As suspected the grant_type seems to be the issue. Currently, client credentials grant type is not supported by custom connectors.

    Specifying connection parameters | Microsoft Learn

     HTTP connector is very similar to Postman requests. Just pass the same request parameters as in Postman and it should be able to generate a token for us.

    Amit_Sharma_0-1672985958761.png

     

  • CU-19081228-9 Profile Picture
    on at

    Thank you very much for taking the time to reply @Amit_Sharma.  I'll give that a try. 

  • cfoenki Profile Picture
    100 on at

    Hi, I am in the same situation. Is the HTTP request the only way to achieve this? Because we have to create a custom HTTP request for each flow when with a custom connector we would just add the action.

    Thank you!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard