Postman requires you to build a manual request to keep the token refreshed because it will not do that for you even though it has that convenient "Get New Access Token" button: Crucially, I left out the manual refresh token request from the collection.
#Swagger editor authorization with custom headers how to
So my question is it possible to connect Power Automate to a custom API using OAuth2? If yes, how to do you elaborate on this? Not sure I understand how to do your trick.Įdit: Scratch that, I've figured it out! I exported a Postman v2.1 collection with all requests using the OAuth2 authorization method. I've seen some guys using Azure AD authentication within the APP, but I was trying to implement something simillar to other platoforms(e.g Github, Spotify, e.t.c) The token that microsoft sends me is a JWT one, not the one I provided. The request above is final request that microsoft before accepting as a valid connection. When Microsoft makes a POST request to "/auth/token", I return the following body:Īccess_token: "non JWT token", // simillar to a hash
Redirect URL: /redirect (Not the real one) In the Power Automate Custom Connector page, in the security tab I have the following: But the problem is that Microsoft sends a Bearer token that was generated by them, and not the one that I gave to them via OAuth2, resuting on my API giving a 401 Error (Invalid Token) as expected. My API has a OAuth2 Code Flow.Īccording to Power Automate, the connector can make a connection to my API. I've been trying to connect Microsoft Power Automate to my API.