Hi @Ibn Ishaq
Thank you for posting this in Microsoft Q&A.
I understand you are trying to retrieve the access_token and refresh_token from the Microsoft authentication endpoint using Postman but getting error HTTP Error 400-The request URL is invalid.According to the screenshot you provided, it appears that you have included the content-type in the URL. You should place the content-type parameter in the header section.
Request an JWT access token using the Postman
Set method as POST.
URL: https://login.microsoftonline.com/consumers/oauth2/v2.0/token
Headers -> Content-Type: application/x-www-form-urlencoded
client_id= Application_id
scope=user.read
code= {The code acquired in previous step}
redirect_uri= https://localhost
grant_type=authorization_code
Hope this helps. Do let us know if you any further queries.
Thanks,
Navya.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.