Open giuseppemilicia opened 7 months ago
In Postman you can configure custom headers for authorization requests. This allows you to set Origin header for Authorization Code flow (with PKCE). Without that header, there is no way (that I know) to avoid AADSTS9002327 error. This means you can't get a valid access token in Bruno for such scenario. Need to stick to Postman, unfortunately.
Adding similar functionality then in Postman in Bruno would be highly appreciated.
It also works in Bruno. Just manually set a header "origin" in your request and then the Authorization Code Flow with PKCE works for Microsoft for example.
In the OAuth 2.0 Authorization Code Flow, certain Identity Providers like Microsoft require specific headers during the access token call. Without these headers, requests fail with errors like AADSTS9002327: Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin requests.
Developers should be able to include custom headers, such as Origin, when making the access token call, ensuring seamless integration with Identity Providers that require specific headers.