Error Details
| Fact | Value | Source | Note |
|---|
| Exact error string | AADSTS50058: A silent sign-in request was sent but no user is signed in. | Browser console (F12 > Console) | -> MSAL.js logs |
| Affected build range | Microsoft 365 / Entra ID | - | - |
| Registry key or OMA-URI involved | - (Not applicable for this issue) | - | - |
| Relevant service/endpoint URL | login.microsoftonline.com | - | - |
| Log line signature | BrowserAuthError: interaction_required with AADSTS50058 in error.message | MSAL.js v2+ logs | -> Entra admin center Sign-in logs |
Log Files to Check
msal.js log file (browser console)Entra admin center > Monitoring & health > Sign-in logs
What This Error Actually Means
AADSTS50058 is an error code raised by Entra ID (formerly Azure AD) when a web application or Single-Page Application (SPA) attempts to silently acquire an OAuth 2.0 / OpenID Connect (OIDC) token using the
prompt=none parameter in its authorization request, but encounters issues with the user's session state. This error occurs because either there is no existing Entra ID session for the user, or the session has expired due to inactivity or policy enforcement. The exact string "AADSTS50058: A silent sign-in request was sent but no user is signed in" appears in the browser console (F12 > Console) when MSAL.js encounters this issue while attempting a silent token acquisition via
acquireTokenSilent(). This error signifies that the application should fall back to an interactive authentication flow, prompting the user to sign in again.
Affected Versions and Scope
AADSTS50058 affects all Microsoft 365 / Entra ID environments where applications are configured to use silent token acquisition with MSAL.js or similar libraries. This issue is particularly prevalent in scenarios involving Single-Page Applications (SPAs) that rely on
prompt=none for seamless user experience without interrupting the application flow. The error does not affect applications that do not attempt silent sign-in, such as those using traditional web forms with explicit login prompts.
Where To Look First: Logs and Event IDs
To diagnose AADSTS50058 errors, start by examining Entra ID logs in the Microsoft 365 admin center. Navigate to "Monitoring & health" > "Sign-in logs", then filter by Status=Interrupted and Error code=AADSTS50058. Look for entries that indicate a failed silent token request due to an expired or missing session cookie. Additionally, check MSAL.js logs in the browser console (F12 > Console) for
BrowserAuthError: interaction_required with AADSTS50058 in the error message when using MSAL.js v2+.
Root Causes
Browser Session Cookie Issues
The most common cause of AADSTS50058 is an expired or missing Entra ID session cookie. This can occur if the user's browser has third-party cookie blocking enabled, preventing login.microsoftonline.com from setting or sending necessary cookies for silent sign-in. To diagnose this issue, check the browser settings and ensure that cross-origin iframe authentication flows are not being blocked by privacy features like Chrome Privacy Sandbox or Safari Intelligent Tracking Prevention (ITP).
Conditional Access Policies
Entra ID Conditional Access policies can enforce strict re-authentication requirements every hour or less. If an application attempts a silent token acquisition during this enforced period, it will receive AADSTS50058 due to the session being invalidated by policy enforcement before the application expects it. To identify such policies, navigate to "Entra admin center > Protection > Conditional Access" and filter for enabled policies with Session controls set to enforce frequent re-authentication.
MSAL.js Configuration Errors
Incorrect configuration in MSAL.js can also lead to AADSTS50058. For instance, if the application attempts a silent token acquisition before the user has ever signed in or uses an incorrect account object or tenant hint, it will fail due to no existing session matching the request criteria. Review your application's source code for
acquireTokenSilent() calls and ensure they correctly reference active accounts.
Fix Procedure
- Implement Silent→Interactive Fallback: Update MSAL.js to handle AADSTS50058 gracefully by implementing the silent→interactive fallback pattern. Use try-catch blocks around
acquireTokenSilent() calls and catch InteractionRequiredAuthError. If caught, proceed with an interactive login using acquireTokenRedirect().
Ensure your application handles the redirect properly to avoid breaking user experience.
- Disable Third-Party Cookie Blocking: Instruct users or configure browsers to allow third-party cookies for login.microsoftonline.com. This is necessary if the application relies on cross-origin iframe authentication flows.
chrome://settings/content/thirdPartyCookies
- Tune Conditional Access Policies: Adjust sign-in frequency policies in Entra ID to reduce the likelihood of session expiration during silent token acquisition. Navigate to "Entra admin center > Protection > Conditional Access" and modify Session controls for existing policies or create new ones with extended intervals.
Get-MgDeviceManagementConditionalAccessPolicy -Filter "signInFrequency eq '1 hour'"
- Extend Persistent Browser Sessions: For compliant devices, configure Entra ID to maintain persistent browser sessions longer. This reduces the frequency of AADSTS50058 errors by extending session cookie lifetimes.
Use this approach carefully as it may conflict with security policies.
Error Code Variants
| Code |
Description |
Distinguishing Factors |
| AADSTS50143 |
User consent required for application permissions. |
This error occurs when an application requests permissions that require explicit user consent, not due to session issues. |
| AADSTS65001 |
Invalid tenant identifier. |
This error indicates a misconfiguration in the client application or Entra ID setup, unrelated to silent sign-in failures. |
Verification
After implementing fixes for AADSTS50058, verify that your application correctly handles interactive fallbacks. Reproduce scenarios where session expiration would trigger this error and confirm the application redirects to Entra ID's login page instead of showing an error. Check MSAL.js logs in the browser console for successful interactive sign-in attempts following a silent failure. Additionally, review Entra admin center > Monitoring & health > Sign-in logs for "Interrupted" entries followed by "Success" entries indicating that the application successfully redirected to an interactive login flow.
Prevention
To prevent recurrence of AADSTS50058 errors, consider implementing persistent browser sessions on compliant devices through Entra ID policies. This can be achieved by configuring Conditional Access policies with session controls set for extended persistence intervals. Additionally, ensure that your application's MSAL.js configuration correctly handles account objects and tenant hints to avoid mismatched silent sign-in requests.
Get-MgDeviceManagementConditionalAccessPolicy -Filter "persistentBrowserSession eq 'true'"
By following these steps and ensuring proper configuration of Entra ID policies and application code, you can mitigate the occurrence of AADSTS50058 errors in your Microsoft 365 / Entra ID environment.