oauth2 error AADSTS90014: The request body must contain the following parameter: ‘grant_type’

You shouldn’t send grant_type neither in params nor in headers. Those should be sent in body params then only it will work.

Url: https://login.microsoftonline.com/common/oauth2/v2.0/token
client_id, scope and redirect_uri params can be sent as query params.
where as grant_type, code and client_secret should sent in body params.

grant_type:authorization_code, 
code: {code you got from the authorization step}, 
client_secret: ****

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)