Reputation: 179
I am trying to make a custom connector in Power Automate with an API that I have used before with Powershell. The issue is that the one parameter I need in the header is Authorization
, which is not allowed by Microsoft for some reason. I have found several forums online about how to get around it, but nothing has worked. Here are some forums with potential solutions:
I am running into the same error message when trying to create a header with Authorization in my header:
'Authorization' header is not allowed. Use 'API Key' authentication type in the Security tab to set this header.
Here are my settings. The Authorization parameter should have a string value of "rest_api_key=xxxxxxxxxxx"
Despite me overriding the header, the actual request header in my connection looks like this. The token is a random string that is very long, so I have shortened it for simplicity.
{
"Authorization": "Bearer eyJ0eXAiOiJKV1...."
}
When I actually go to make a connection I am entering the full value "rest_api_key=xxxxxx" as the Authentication parameter.
Has anybody else run into this issue when trying to set a header of Authorization?
Upvotes: 0
Views: 6684
Reputation: 11
I set it to "No authentication" for the authentication type under the security tab. Set a new policy "Set HTTP header", Header name "Authorization", Header value "Basic NzZiZ............" (what you need it to be). Action if header exists, "override". Run policy on "Request".
This worked for me.
Upvotes: 1