azureazure-active-directorysecret-key

Azure App registration Client secrets expiration


Has Microsoft changed the expiration date for Client secrets to be max 2 years? It is not possible to select "Never" anymore?


Solution

  • I just ran into this myself. You can set add a credential using Powershell which is more than 2 years. So I'm guessing it's a UI limitation.

    $startDate = Get-Date
    $endDate = $startDate.AddYears(98)
    $aadAppsecret01 = New-AzureADApplicationPasswordCredential -ObjectId b09d3e1b-417d-425c-be05-9e46943d7207 -StartDate $startDate -EndDate $endDate