Can't authenticate with Azure AD username and password #5
Comments
Note that this is exactly the same scenario as in the ADAL samples: https://github.com/AzureAD/azure-activedirectory-library-for-java/blob/dev/src/samples/public-client-app-sample/src/main/java/PublicClient.java, only difference is the authority (I tried using the one from the samples with no luck) |
It looks like you have registered your app as a confidential client (web app or web api). You cannot authenticate with username and password when the app is a confidential client. Only public clients, sometimes known as native clients, can do U/P authentication. In general, U/P auth is discouraged. See this StackOverflow answer for a bit more detail. |
Thanks for the advice and URLs. You're absolutely right about the application being registered as "Web app / Web API". Changing to native client solved the issue. |
Thanks your advice, really solved auth issue.. Cheers. |
Hi,
Not sure if this belongs here or in the ADAL-repository, but it would be great if you could comment on it. I'm able to authenticate with keyvault with a client_id and client_secret, but not my own user. The latter is desirable for local dev environments.
Here's the implementation of the
doAuthenticate(..)
method inKeyVaultCredentials
:A breakpoint in
AdalTokenRequest#executeOAuthRequestAndProcessResponse
shows the following error from the server:The text was updated successfully, but these errors were encountered: