Managing external identities to enable secure access for partners, customers, and other non-employees
How to extend session lifetime beyond 24 hours in Microsoft Entra External ID (CIAM) to prevent daily automatic logouts?
Vivaan Rajput
0
Reputation points
Details:
I'm using Microsoft Entra External ID (ciamlogin.com) for customer authentication in my SPA application, and users are automatically logged out every 24 hours. I need to extend the session lifetime to keep users signed in for longer periods (weeks/months).
Current Configuration:
- Tenant type: External ID (CIAM) with ciamlogin.com authority
- Application type: Single Page Application (SPA) using MSAL.js v4.12.0
- User flow: Sign-up/Sign-in policy
- Scopes requested: openid, profile, offline_access
- Cache location: localStorage
- storeAuthStateInCookie: true
Issue:
- Users are logged out automatically after ~24 hours
- MSAL's acquireTokenSilent() returns InteractionRequiredAuthError after this period
- localStorage contains valid refreshToken, but it appears to expire server-side after 24 hours
What I've tried:
- Verified offline_access scope is included in login request
- Confirmed MSAL tokens (access, ID, refresh) are persisted in localStorage
- Looked for Conditional Access session controls - these are unavailable (message: "This feature is unavailable or doesn't apply to the current tenant configuration")
- Checked user flow settings - no visible session lifetime or "Keep me signed in" (KMSI) configuration options
- Reviewed app manifest - no token lifetime properties exposed
Questions:
- How do I configure session/token lifetimes in Entra External ID (CIAM) to extend beyond 24 hours?
- Where is the "Keep me signed in" (KMSI) toggle located for External ID tenants?
- Are session controls configured at the user flow level, tenant level, or app registration level in External ID?
- If these settings are not exposed in the portal UI for External ID, is there a Microsoft Graph API or PowerShell method to configure longer refresh token lifetimes?Details: I'm using Microsoft Entra External ID (ciamlogin.com) for customer authentication in my SPA application, and users are automatically logged out every 24 hours. I need to extend the session lifetime to keep users signed in for longer periods (weeks/months). Current Configuration:
- Tenant type: External ID (CIAM) with ciamlogin.com authority
- Application type: Single Page Application (SPA) using MSAL.js v4.12.0
- User flow: Sign-up/Sign-in policy
- Scopes requested: openid, profile, offline_access
- Cache location: localStorage
- storeAuthStateInCookie: true
- Users are logged out automatically after ~24 hours
- MSAL's acquireTokenSilent() returns InteractionRequiredAuthError after this period
- localStorage contains valid refreshToken, but it appears to expire server-side after 24 hours
- Verified offline_access scope is included in login request
- Confirmed MSAL tokens (access, ID, refresh) are persisted in localStorage
- Looked for Conditional Access session controls - these are unavailable (message: "This feature is unavailable or doesn't apply to the current tenant configuration")
- Checked user flow settings - no visible session lifetime or "Keep me signed in" (KMSI) configuration options
- Reviewed app manifest - no token lifetime properties exposed
- How do I configure session/token lifetimes in Entra External ID (CIAM) to extend beyond 24 hours?
- Where is the "Keep me signed in" (KMSI) toggle located for External ID tenants?
- Are session controls configured at the user flow level, tenant level, or app registration level in External ID?
- If these settings are not exposed in the portal UI for External ID, is there a Microsoft Graph API or PowerShell method to configure longer refresh token lifetimes?
Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Sign in to answer