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
626 stars 373 forks source link

Acquire token silently fails when MFA code is required #912

Closed XI1687-kapilmittal closed 4 years ago

XI1687-kapilmittal commented 4 years ago

InteractionRequiredAuthError: AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access.

I am getting this issue when trying to get token silently.

jasonnutter commented 4 years ago

@XI1687-kapilmittal Apologies for the delay. Silent token acquisition can fail for many reasons, including for MFA challenges due to conditional access, which this error appears to be. You can resolve this by invoking one of the interactive methods, acquireTokenPopup or acquireTokenRedirect.