3

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?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
zhigang
  • 33
  • 1
  • 1
  • 3

1 Answers1

8

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.

Afshin
  • 226
  • 1
  • 4