AzureAD / azure-activedirectory-library-for-js

The code for ADAL.js and ADAL Angular has been moved to the MSAL.js repo. Please open any issues or PRs at the link below.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/maintenance/adal-angular
Apache License 2.0
627 stars 374 forks source link

Support for `/oauth2/v2.0/authorize` #913

Closed pbatey closed 4 years ago

pbatey commented 4 years ago

It looks like /oauth2/authorize is hard-coded in adal.js -- When I use it as-is I get the following error:

AADSTS650056: Misconfigured application. This could be due to one of the following: the client has not listed any permissions for 'AAD Graph' in the requested permissions in the client's application registration. Or, the admin has not consented in the tenant. Or, check the application identifier in the request to ensure it matches the configured client application identifier. Or, check the certificate in the request to ensure it's valid. Please contact your admin to fix the configuration or consent on behalf of the tenant.

My admin team recommends that I use the V2 endpoint instead of V1 at /oauth2/v2.0/, but there is no way to configure it in this library.

pbatey commented 4 years ago

I'm working on a pull-request. Seems that will require support for a 'scope' configuration option as well.

jasonnutter commented 4 years ago

ADAL.js intentionally uses the v1 endpoint, and we have no plans to add support for v2. MSAL.js switches to the v2 endpoint, and is backwards compatible with ADAL.js and v1. If you need v2 tokens for your applications, we recommend upgrading to MSAL.js: https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core

pbatey commented 4 years ago

Thanks for the response. It confirms the update I just got from my admin team.