How to track expiring app secrets and tokens
Apps and automations stop working the day a secret, certificate or token expires, often at an awkward hour. Microsoft's own emails go to individual owners, not to a team. This guide shows where these credentials live and how to keep a simple inventory by hand.
Where Entra app credentials live
In the Microsoft Entra admin center, open App registrations, select an application, and go to Certificates & secrets. That page has tabs for Certificates, Client secrets and Federated credentials, and each client secret and certificate has an expiry date.
Microsoft's documentation says client secret lifetime is limited to two years (24 months) or less, and recommends an expiration of less than 12 months. It recommends certificates over secrets for production. The secret value is shown only once, when you create it.
One caution from Microsoft's page: if an Azure DevOps service connection created its service principal automatically, update the client secret from the Azure DevOps portal instead of changing it directly in Entra.
Microsoft also describes federated credentials, which let workloads such as GitHub Actions or Kubernetes reach Entra-protected resources without a secret to manage. Where an automation supports them, they remove one item from your expiry list.
Where Azure DevOps tokens live
A personal access token (PAT) is created and managed by each user. In Azure DevOps you open user settings and select Personal access tokens. Microsoft's documentation says Azure DevOps sends a notification when you create a PAT and another before it expires, so the warning goes to the owner of the token.
When a PAT expires, Azure DevOps rejects further sign-ins that use it, and a pipeline, script, package client or Git operation typically fails the next time it authenticates.
Azure DevOps also records PAT lifecycle events, including creation, expiry, revocation and modification, in the organization audit log, under Organization settings, then Auditing. Microsoft notes the audit log keeps events for 90 days, and that it does not log when a token is used, so it cannot tell you whether a token is still in active use.
A PAT is always tied to the user who created it. Microsoft's documentation notes that for applications and automation it prefers Microsoft Entra tokens, managed identities or service principals. Review any credential owned by an individual whose role may change, and check what happens to PATs when an account is disabled: Microsoft says they stop working for that organization, so an integration that relied on them can fail when the account is disabled.
Build a simple inventory
Microsoft's own advice for PATs is to keep an inventory of each token's owner, purpose, scopes, expiration and dependent integrations. The same list works for Entra credentials. A shared spreadsheet is enough to start.
- Name of the app or token
- Type: client secret, certificate or PAT
- Expiry date
- Owner, and a second person or team who should also be told
- What depends on it: which pipeline, script or integration would stop
- Where the replacement is stored, never the value itself
Review on a schedule, and replace without an outage
Microsoft's rotation advice for PATs is a good pattern for any credential. Create the new one with only the permissions needed and a short lifetime, store it in your secret store, test it on one integration first, update every service that holds the old one, test them all, and only then revoke the old one.
Make one person responsible for the monthly review, and one backup person. An inventory that everyone can edit but nobody owns tends to go stale within a quarter, and a stale list is worse than none because it looks trustworthy.
- Every month, sort the inventory by expiry date and look at the next 90 days
- At 60 days, assign the replacement to a named person
- At 30 days, create the new credential and test it
- At 7 days, escalate anything still not replaced
- After replacement, remove the old entry and record the new expiry
Where the credential expiry radar fits
The credential expiry radar is coming soon as a module for GuestPier. It is planned to automate the inventory: one calendar of expiring secrets, certificates and tokens, with alerts to the owning team. Until it is released, a shared inventory and a monthly review will catch most of them.
Sources
- Microsoft Learn: Add and manage app credentials in Microsoft Entra ID
- Microsoft Learn: Use personal access tokens in Azure DevOps
Coming soon: Credential expiry radar
One calendar of every cloud secret and token about to expire. An add-on module for GuestPier that watches the app secrets, certificates and access tokens of a company's Microsoft cloud and Azure DevOps accounts, and warns the right team before any of them expires and breaks something. It is for IT teams and consultants who manage many Microsoft accounts.
Get Credential expiry radar first
Join the list and get 25% off your first purchase when it goes on sale. We email you a discount code on launch day. One code per person, for new customers.
One email when it launches (plus the discount code). No other mail, and you can say stop at any time. See our privacy policy.