Skip to main content

Notifications

Community site session details

Community site session details

Session Id : I+8bab3FIxL+FjaG+LC5d7
Power Automate - Using Connectors
Answered

Authorization Bearer in Header - Custom Connector

Like (3) ShareShare
ReportReport
Posted on 18 Aug 2017 18:09:45 by

I have created a custom connector that is connecting to a vendor's API.  I have unauthenticated GET methods working, but now am working on some POSTs and am running into an issue with putting "Authorization: Bearer token_value" in the header.  Even on the unauthenticated GET calls, I can see in the request header that "Authorization: Bearer some_token_value" is already there.  I've tried setting the Header in my POST call, but then I get the error: "Message": "Error from ASE: Bad authorization header scheme".

 

I can see that the request header has my token_value and so it appears I'm not allowed to set the header that way.  What is the right way to send my "Authorization: Bearer token_value" to the API?

 

Thank you.

Categories:
  • Isaac_Asimov Profile Picture
    on 02 Jul 2024 at 17:08:07
    Re: Authorization Bearer in Header - Custom Connector

    Unfortunatly the solution explained by @Yoshi1 and @LaelLeeH doesn't seem to work anymore. (btw thanks for your posts!!)

    The policy doesn't get executed, and the "Authorization" value remain unchanged, no matter what value the policie is supposed to give it (wanted to replace Bearer by Basic here -> maybe thoses options doesn't work with a Basic Authorization value.... ?).

     

    Isaac_Asimov_2-1719939742950.png

    However! I'm working with an httpS:// URL so MAYBE the policie doesn't work on them since it's title is "Set HTTP header". Would be logical although quite suprising.

     

    Second option that is to set the security at API Key and give it "Authorization" as a parameter name and

    "Bearer YOUR_BEARER_TOKEN_VALUE" as a value when creating the connexion doesn't work either. The connector ignore it and still send the generated Authorization value

    Isaac_Asimov_3-1719939802654.png

     

     

    Advice to any reader, open Power Automate ^^'

  • Rookie1 Profile Picture
    28 on 06 Jun 2024 at 09:50:30
    Re: Authorization Bearer in Header - Custom Connector

    Did you get a solution to this? I have the same issue

     

  • NiveditaKapil Profile Picture
    5 on 29 May 2024 at 08:30:26
    Re: Authorization Bearer in Header - Custom Connector

    Hi, I tried this approach but it doesn't work for me. I have a local  gateway setup for an internal api that needs to authenticate using bearer token.

     

    Everything looks okay but I get a 400 as respose. Any help here would be greatly appreciated.

  • boww1 Profile Picture
    19 on 07 May 2024 at 14:36:30
    Re: Authorization Bearer in Header - Custom Connector

    this one works for me, thank you, yoshi!

  • GB-Andworx Profile Picture
    33 on 20 Dec 2023 at 21:00:50
    Re: Authorization Bearer in Header - Custom Connector

    @Anonymous, I'm getting the same behavior. Did you ever figure it out?

  • MiljanaSt Profile Picture
    37 on 18 Oct 2023 at 22:09:06
    Re: Authorization Bearer in Header - Custom Connector

    Hello,

    I lost two days just to figure it out that in access-token you should not only post the token. The value that goes in access-token is "Bearer access-token" no double quotes.

    Thanks for the solution

  • Community Power Platform Member Profile Picture
    on 26 Aug 2023 at 15:24:25
    Re: Authorization Bearer in Header - Custom Connector

    For some reason both headers are being sent (with different values?!), which causes failures in my call:

    Ricalex_0-1693063417788.png


    Does anyone know what can I be missing? I've selected 'No Authentication' in the Security tab.

  • RamyEdrees Profile Picture
    45 on 17 Aug 2023 at 08:17:37
    Re: Authorization Bearer in Header - Custom Connector

    Hi @Anonymous ,

    I have the same problem like you. I have a an API from a service and I need to call it. In order to do this they have another url with basic auth in order to get a bearer token and then use it as authorization in my call. I am not a developer and doing this for my family business.. Do you mind if you can guide me how you did that step by step?

  • elbpc Profile Picture
    2 on 16 May 2023 at 12:22:10
    Re: Authorization Bearer in Header - Custom Connector

    Thanks so much for your reply, it really helped me solve my issue!

    👍

  • Volker Steltenkamp Profile Picture
    10 on 08 May 2023 at 15:05:25
    Re: Authorization Bearer in Header - Custom Connector

    @Yoshi1 Did you get this to work even on "Get" Requests? Or only on "Post" Method?

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Using Connectors

#1
lbendlin Profile Picture

lbendlin 7 Super User 2025 Season 1

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 6 Super User 2025 Season 1

#3
KT-07051015-0 Profile Picture

KT-07051015-0 4

Overall leaderboard

Featured topics