I wrote the authentication code below with ADAL for android:
mAuthContext = new AuthenticationContext(MainActivity.this, Constants.AUTHORITY_URL,false);
mAuthContext.acquireToken(MainActivity.this, Constants.RESOURCE_ID, Constants.CLIENT_ID,Constants.REDIRECT_URL, Constants.USER_HINT, getCallback());
Windows Azure China version(localized version) has not yet supported to register an app as "native client app", no option at all. So I continue seeing the error below when running the code above.
Server error message:
{"error":"invalid_request","error_description":"AADSTS90014: The request body must contain the following parameter: 'client_secret or client_assertion.
It seems there's no parameters about credentials for "acquireToken" in ADAL Android SDK. Does anyone know how to workaround this?
It seems since you could not add a naive client app, you have created a Web app instead which is analogous to confidential client in OAuth protocol. That is why it is asking for client credential. ADAL Android currently does not support confidential clients.
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