Last active
April 15, 2020 11:26
-
-
Save OlafD/b704264f697cae0d6e3f9ae419bc91c2 to your computer and use it in GitHub Desktop.
Set the access token lifetime in Azure AD for the whole organization. In the script it will be set to 10min, the minimum possible. Needs the module Azure AD PowerShell 2.0, To run connect with Connect-AzureAD to your directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$policy = New-AzureADPolicy ` | |
-Definition @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"00:10:00","MaxAgeSessionSingleFactor":"00:10:00"}}') ` | |
-DisplayName "WebPolicyScenario" ` | |
-IsOrganizationDefault $true ` | |
-Type "TokenLifetimePolicy" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment