azure-active-directoryazure-ad-b2cazure-ad-graph-api

"AADSTS900144: The request body must contain the following parameter: 'grant_type'.?


I built an app in my Azure ad b2c tenant and configured it as shown, but why can't I request an access token in postman?

app registration

API permissions

postman screenshot

Here are the links to the two documents I follow:

Register a Microsoft Graph application

Get access without a user


Solution

  • One thing I noticed is that the parameters for the token request should be in the body as form parameters, like this:

    Parameters in Body tab of Postman with x-www-form-urlencoded selected

    You should use the parameters you've defined here though, this screenshot shows a test request for the ROPC flow so the parameters in the picture are not valid for your use case.

    So instead of entering the parameters in Params, enter them in Body tab after selecting x-www-form-urlencoded as the type.