How to configure Code value from Azure platform 'AADSTS900144'

2.7k views Asked by At

Whenever i connect Azure platform from my platform & access for Authorization getting an error like the following

Authorization failed with the error message, 'AADSTS900144: The request body must contain the following parameter: 'code'. Trace ID: 0c2a6ce5-a127-491f-8ef5-34b4b0f11a00 Correlation ID: 5ae207ac-ff51-43da-92a6-0225372c55b1 Timestamp: 2020-10-06 11:19:33Z'

Similarly faced scope value exception.Refered the link AADSTS900144: The request body must contain the following parameter: 'scope' when using legacy Developer Portal

Now, How to fetch the code value Azure platform?

2

There are 2 answers

0
AlfredoRevilla-MSFT On

Code will be provided in the response of the authorization request. Once obtained you will include it in the token request as detailed in Request an access token.

0
Carl Zhao On

According to your error message, you are missing request parameters when requesting an access token. You need to put the following parameters in the request body

enter image description here

For code, it needs to be acquired by interactive login users, you need to execute the following request in the browser to acquire it:

https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize?
client_id=6731de76-14a6-49ae-97bc-6eba6914391e
&response_type=code
&redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F
&response_mode=query
&scope=openid%20offline_access%20https%3A%2F%2Fgraph.microsoft.com%2Fmail.read
&state=12345

enter image description here