Judging by the other thread and the same error I'm getting, I'd say this is an issue on the backend. Do note however that the token lifetime policies will be deprecated, and going forward you should use the session control functionality instead: https://learn.microsoft.com/en-us/azure/active-directory/conditional-access/howto-conditional-access-session-lifetime#configuring-authentication-session-controls
Getting error while creating new AzureADPolicy
I am not able to created new AzureADPolicy and getting below error.
Script which I am using
New-AzureADPolicy -Definition @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"23:59:59","MaxAgeSessionSingleFactor":"23:59:59"}}') -DisplayName "WebPolicyScenario" -IsOrganizationDefault $false -Type "TokenLifetimePolicy"
Error which I am getting
Can anyone help if I am missing anything?
Below powershell module installed on my machine...
ModuleType Version Name ExportedCommands
Binary 2.0.2.5 AzureADPreview {Add-AzureADAdministrativeUnitMember, Add-AzureADApplicationOwner, Add-AzureADApplicati...
2 answers
Sort by: Most helpful
-
-
Anuj Rana 221 Reputation points
2020-04-09T04:56:59.003+00:00 You need to update your module to 2.0.2.85. Previous modules are no longer supported for policy creation.
You can update the same from : https://t.co/kPilxDKnMQ?amp=1
Please confirm if this fixes your issue. I have tested new policy using the parameters you have shared and it is working as expected on 2.0.2.85.