Core Library
MSAL.js v2 (@azure/msal-browser)
Core Library Version
2.32.0
Wrapper Library
MSAL React (@azure/msal-react)
Wrapper Library Version
1.5.0
Public or Confidential Client?
Public
Description
I'm using the useIsAuthenticated() hook to render specific components when a user is signed in with a valid session. When the token expires, useIsAuthenticated() returns true.
Error Message
InteractionRequiredAuthError: interaction_required: AADSTS70044: The session has expired or is invalid due to sign-in frequency checks by conditional access.
Trace ID: c6c8ef47-fefa-4c22-a062-0c711089dc00
Correlation ID: b72a73fe-3359-44ca-b770-8eaab110d757
Msal Logs
No response
MSAL Configuration
{
auth: {
clientId: '',
authority: '',
redirectUri: window.location.origin
},
cache: {
cacheLocation: 'localStorage',
storeAuthStateInCookie: false
}
}
Relevant Code Snippets
import { useIsAuthenticated } from '@azure/msal-react'
const IsAuthenticated = useIsAuthenticated()
export default function MyComponent () {
return (
IsAuthenticated === true
? Valid Session
: Invalid Session
)
}
Reproduction Steps
- Wait for the token to expire
- Log the return value of useIsAuthenticated()
Expected Behavior
useIsAuthenticated() should be returning false when a session is invalid.
Identity Provider
Azure AD / MSA
Browsers Affected (Select all that apply)
Chrome
Regression
No response
Source
External (Customer)
Core Library
MSAL.js v2 (@azure/msal-browser)
Core Library Version
2.32.0
Wrapper Library
MSAL React (@azure/msal-react)
Wrapper Library Version
1.5.0
Public or Confidential Client?
Public
Description
I'm using the useIsAuthenticated() hook to render specific components when a user is signed in with a valid session. When the token expires, useIsAuthenticated() returns true.
Error Message
InteractionRequiredAuthError: interaction_required: AADSTS70044: The session has expired or is invalid due to sign-in frequency checks by conditional access.
Trace ID: c6c8ef47-fefa-4c22-a062-0c711089dc00
Correlation ID: b72a73fe-3359-44ca-b770-8eaab110d757
Msal Logs
No response
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
Expected Behavior
useIsAuthenticated() should be returning false when a session is invalid.
Identity Provider
Azure AD / MSA
Browsers Affected (Select all that apply)
Chrome
Regression
No response
Source
External (Customer)