Increase Access token lifetime to 12 hours using a custom policy
Praveena Uppalapati [ELB]
51
Reputation points
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).