cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ErickDiaz
Helper II
Helper II

'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
Helper II
Helper II

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

1 REPLY 1
ErickDiaz
Helper II
Helper II

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (66,892)