Oauth 2 - The endpoint only accepts POST, OPTIONS requests

I’m trying to configure my Postman .
In a first step I configured a request that get me a token, then I copy the value in a variable !
I’ve found the “Authorization” section that allows to set up a OAuth 2.0 , but I can’t figure out how to define the “method” to “POST” , is it possible ?
Here is how i’ve configured it :

I found a script (Customize oauth2 refresh token url), but i think i’m not so far to make it work using postman functionalities

The OAuth standard only accepts POST, which is why there aren’t any options to change it. It will be a POST request by default.

Send the request, and then check the response in the console logs.
The Microsoft endpoints usually return some detail on what is wrong with an request.

I’ve finally understood my mistakes , here is how to configure , the “grant type” was invalid :

Update : you don’t need to fill in the “Refresh Token URL”, as it uses the “Access Token URL” if empty

It stranges, because as I said in a first step, I configured a request to get the token, but it’s a GET request :

Very strange, as all of my requests to that token end point are POST requests.

For example…

I wonder if the Microsoft API can handle both methods.

You might want to take a look at the following question on Stack Overflow.

authentication - Should clients get OAuth 2 access tokens using GET or POST? - Stack Overflow

I can see a major difference with my request : you connect using “username/password”, while i connect using an app that I declared in Azure AD, and my “grant_type” is “client_credentials”.
But as I said now i successfully configured my “authorization” at the collection level all is OK for me.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.