Increase Access token lifetime to 12 hours using a custom policy

Praveena Uppalapati [ELB] 51 Reputation points
2021-10-13T08:21:45.057+00:00

We're trying to configure access token expiry time to 12 hours using below powershell cmdlets, but it's not getting enforced on application.

New-AzureADPolicy -Definition @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"12:00:00"}}') -DisplayName $policyName -IsOrganizationDefault $false -Type "TokenLifetimePolicy"

$app = Get-AzureADApplication -Filter "DisplayName eq '$applicationName'"

Add-AzureADApplicationPolicy -Id $app.ObjectId -RefObjectId $policy.Id

Need help in configuring access token expiry time to 12 hrs for an app in Azure AD (Default is 1 hr).

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,456 questions
{count} vote