cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ErickDiaz
Resolver I
Resolver I

'Authorization' header is not allowed. Use 'API Key' authentication type in the Security tab to set this header.

Hi,

 

I'm currently creating a custom connector and after getting the access token, I need to be able to make a request passing this token in the header as an authentication bearer token, i.e. Authorization: Bearer abcdefghigklmnopqrstuvwxyz0123456789

 

I specified the two required headers on my request, Content-Type and Authorization, but got the following error:

 

'Authorization' header is not allowed. Use 'API Key' authentication type in the Security tab to set this header.

 

The problem is that this API is located on an on-prem server and "API Key Authentication" is not available when connecting via data gateway.

 

Is there any workaround to this problem?

 

Thank you,

 

Erick

1 ACCEPTED SOLUTION

Accepted Solutions
ErickDiaz
Resolver I
Resolver I

I was able to do figure out a workaround for this problem and it’s now working correctly.

 

In case someone has the same problem in the future:

 

1. I created a custom header called "Access-Token" where I pass the value from my Flow as "Bearer abcdefghigklmnopqrstuvwxyz0123456789".


2. Then, I created a Policy to "Set HTTP header", where the Header Name = Authorization and Header Value = @headers('Access-Token'). The action is set to override and the policy runs on the request.

 

This will add the header Authorization: Bearer abcdefghigklmnopqrstuvwxyz0123456789 to my request as expected by the API.

View solution in original post

2 REPLIES 2
ErickDiaz
Resolver I
Resolver I

I was able to do figure out a workaround for this problem and it’s now working correctly.

 

In case someone has the same problem in the future:

 

1. I created a custom header called "Access-Token" where I pass the value from my Flow as "Bearer abcdefghigklmnopqrstuvwxyz0123456789".


2. Then, I created a Policy to "Set HTTP header", where the Header Name = Authorization and Header Value = @headers('Access-Token'). The action is set to override and the policy runs on the request.

 

This will add the header Authorization: Bearer abcdefghigklmnopqrstuvwxyz0123456789 to my request as expected by the API.

View solution in original post

JacksonOng
Helper I
Helper I

@ErickDiaz ,

 

You save my day. Thank you for the fantastic solution.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,053)