MetricSign
Start free
Medium severityauthentication

Power BI Error:
AADSTS160021

What does this error mean?

The application requested a specific user session in Microsoft Entra ID (Azure AD) that no longer exists or was never established.

Common causes

  • 1The app's authorization request includes a session_id parameter referencing a session that has already been terminated or expired
  • 2User signed out of Microsoft Entra ID in another tab while the app still held a reference to the old session
  • 3Stale browser cookies or cached tokens pointing to a session that no longer exists on the Entra ID side
  • 4Multiple Microsoft accounts in the same browser causing the requested session to mismatch the active one
  • 5Application incorrectly reusing a session_id across tenants or after a tenant-level sign-out event

How to fix it

  1. 1Sign out completely from all Microsoft accounts at https://login.microsoftonline.com/common/oauth2/logout and close all browser tabs
  2. 2Clear cookies and site data for login.microsoftonline.com and login.live.com, then restart the browser
  3. 3Retry sign-in in a private/incognito window to rule out stale session cookies
  4. 4If the error reproduces, inspect the auth request: remove any hardcoded session_id or sid parameter and let Entra ID establish a fresh session
  5. 5For embedded Power BI or custom apps: ensure your MSAL/ADAL configuration does not cache a session_id beyond its lifetime — switch to acquireTokenSilent with proper fallback to interactive auth

Frequently asked questions

What does AADSTS160021 mean?

Application requested a user session that doesn't exist. This issue can be resolved by creating new Azure account.

How do I fix this error?

Check your application registration, token configuration, and user permissions in the Azure portal. Review Conditional Access policies if the error is policy-related.

Source · learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes#aadsts-error-codes

Other authentication errors