I used the code in 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 the CLIENT_ID is updated.
I keep getting the error message
"error_description":"AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'
I am not sure how and where to specify this? Is there something that needs to be done in the configuration of the client by the admin?
Had the same issue and finally resolved. In my case I was using the Redirect URI (like a common web URL) copied from Web application section in dev console, which made the server "think" the request was from a web client. After changing to the Redirect URI (something in format of urn:ietf:wg:oauth:2.0:oob , which means it's from a native client) from the application section, my Android app finally worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With