79759605

Date: 2025-09-09 07:27:15
Score: 0.5
Natty:
Report link

This is a huge problem for my application, that refresh tokens expire after 12 hours using Microsoft Entra External ID with Email OTP! We need the 90 days that we are used to!

There is no way to change it. And the last resort is now not possible, as you can't create b2c tenants anymore!!!


$policy = New-AzureADPolicy -Definition @('{"AccessTokenLifetime":"23:59:59","RefreshTokenLifetime":"90:00:00:00","RollingRefreshTokenLifetime":"90:00:00:00"}') -DisplayName "WebPolicyScenario" -IsOrganizationDefault $false -Type "TokenLifetimePolicy"
 
Get-AzureADPolicy -Id $policy.Id
 
$sp = Get-AzureADServicePrincipal -Filter "DisplayName eq 'XXX'"
Add-AzureADServicePrincipalPolicy -Id $sp.ObjectId -RefObjectId $policy.Id

enter image description here

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: jesben