Yep, classic Entra operational blind spot—those app secret and cert expirations love to sneak up on you until something in production breaks.
If you need a quick way to audit all upcoming expirations across the tenant via PowerShell instead of clicking through the portal one by one, you can pull them with Microsoft Graph PowerShell:
Connect-MgGraph -Scopes "Application.Read.All"
$apps = Get-MgApplication -All
foreach ($app in $apps) {
foreach ($secret in $app.PasswordCredentials) {
if ($secret.EndDateTime -lt (Get-Date).AddDays(30)) {
[PSCustomObject]@{
AppName = $app.DisplayName
AppId = $app.AppId
KeyId = $secret.KeyId
Expires = $secret.EndDateTime
DaysLeft = [math]::Round(($secret.EndDateTime - (Get-Date)).TotalDays)
}
}
}
}
This grabs anything expiring in the next 30 days. You'll also want to check $app.KeyCredentials for expiring certificates. For a permanent fix, you either rotate the secret in the portal, update your app config, or look into transitioning those apps to Managed Identities wherever possible so you don't have to deal with secrets at all.
If you ever get tired of babysitting scheduled scripts for this across multiple tenants, I built a self-hosted Windows tool called Veritas Next (Entra Integration Health) that runs locally, tracks 7/30/90-day secret/cert expirations with .ics calendar reminders, and surfaces ownerless apps using read-only cert auth without sending data to the cloud.