"error_description": "AADSTS70002: the request body must contain the following parameter:" client_secret or client_assertion "

I used the code at https://github.com/AzureAD/azure-activedirectory-library-for-java/blob/master/src/samples/public-client-app-sample/src/main/java/PublicClient.java . The only difference is updating CLIENT_ID.

I keep getting error message

"error_description": "AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'

I'm not sure how and where to indicate this? Is there something that needs to be done in the client setup by the administrator?

+6
source share
1 answer

Had the same problem and finally solved. In my case, I used the Redirect URI (like a normal web URL), copied from the web application section in the dev console, which made the server "think" that the request was from the web client. After changing the Redirect URI (something in the urn: ietf: wg: oauth: 2.0: oob format, which means that it belongs to the native client) from the application section, my Android application finally worked.

+4
source

Source: https://habr.com/ru/post/1012715/


All Articles