For my customer connector I use Oauth 2.0 authentication type with Azure Active Directory as an identity provider.
By default, token is sent to my application in "Authorization" header. However, my app requires another HTTP header name for a token value. How can I change the name of the header, in which token is sent?
I.e currently custom connector is sending: "Authorization": "Bearer token_value"
What I want: "My-custom-name": "Bearer token_value"
I know that this parameter name is customizable in Api Key based authentication method, but I want to stick to Oauth 2.0 authentication type.
Hey @Anonymous ,
sorry for my late response. I wasnt Online for a couple of days. #internetDetox
I was thinking about it again. I was using the app registration in the past to use Oauth2.
So what I did was registring an app: Quickstart: Register an app in the Microsoft identity platform | Microsoft Docs
and then I was using that in order to create a custom connector. I was able to use the client secret and Id of the registration in order to get my needed tokens. This article describes the way I was doing it:
oauth 2.0 - How to connect custom API using own OAuth2 in Microsoft Power Automate? - Stack Overflow
Currently I have a limited understanding of what you already tried and what you already did and which permissions you have on the tenant.
You can test this approach with postman aswell. You just need to call the app registration first and then you can use the token in the next call you want to make. Like here: Collaborating on OAuth2.0 with Postman | Postman Blog
If the approach does not work, please describe the scenario a bit more in detail. Maybe with some screens aswell.
With Regards
Kevin
Hello @powercorner, thank you for your answer. Have you managed to change an authorization header in this way? According to my research, Postman does not support the customization of Authorization header for Oauth 2.0 as well.
Hey @Anonymous ,
One work around I often do is, I first create the API call with Postman and when I am sure that the connection is working, I export the Postman collection and then import it while creating the custom connector. Have you tried this before?
How are you building your custom connector? Are you using the graphic interface in the browser or do you define the connector as code somehow?
With regards
Kevin