Hello @Samuele Furnari !
Thank you for the detailed update !
So lets sum it up !
Did you tried the Graph Commands :
Import-Module Microsoft.Graph.Identity.SignIns
$params = @{
definition = @(
'{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}'
)
displayName = "Contoso token lifetime policy"
isOrganizationDefault = $true
}
New-MgPolicyTokenLifetimePolicy -BodyParameter $params
You said you did tried but did not worked ? Is this the method you tried ?
Also , allow me to point you to Conditional Access - What If tool , it may help you in general .
It allows you to run "what if " scenarios on CA Policies without actually enabling them so you can have a general idea of what is going to happen when you set a Policy to Enabled.
I hope this helps!
Kindly mark the answer as Accepted and Upvote in case it helped!
Regards