Preventing Expiry
Microsoft Entra ID: Integrations & Access Troubleshooting
Course 1 ยท Chapter 9 ยท Preventing It Happening Again
A credential that expires is the most predictable incident there is. Unlike a disk failure or a bad release, it comes with a date printed on it. When one catches a team out, the date was not the problem: nobody owned it, nobody was reminded, or the reminder went to someone who had left. Prevention is therefore not a clever technology. It is a small, boring system: a list of every expiry, an owner for each, warnings that reach a real person, and a rehearsed renewal. This chapter builds that system out of what Entra offers and what your own product can add.
Why These Incidents Recur
| Root cause | What it looks like | Systemic fix |
|---|---|---|
| No one has the list | The expiry date exists only in the portal; no one looked until it failed | A register (below) |
| Reminders go to the wrong place | Entra's emails go to whoever created the app: someone who left, or an unread mailbox | Shared or distribution-list recipients; verify them |
| No one owns renewal | The client assumes the vendor will renew; the vendor assumes the client will | An agreed owner on each side, written down |
| Renewal is risky | Past renewals broke things, so people delay them | A rehearsed create-install-prove-remove runbook (Chapter 8) |
| Two-sided mismatch | Renewed in Entra but not in the product, or the reverse | One checklist covers both sides; product shows what it is using |
| Short surprise lifetime | A client's policy caps lifetimes lower than anyone expected | Ask about their application management policies up front (Chapter 4) |
Who Can Prevent What
Your reach depends on the arrangement (Chapter 2). Prevention you control completely is different from prevention you can only request.
| Arrangement | Credentials owned by | You can do directly | You must ask the client for |
|---|---|---|---|
| A: your multitenant app | You (registration in your tenant) | Everything: register, owners, reminders, rotation, longer-term credential design | Mainly consent, assignment and Conditional Access, not credentials (Chapter 6) |
| B: client creates the registration | The client (their tenant) | Your product's side: where the credential is stored, warnings, overlap support | Expiry dates, owners, notification recipients, rotation scheduling |
| C: SAML or SCIM to your product | Shared: Entra signs (client side), your product trusts or accepts (your side) | Metadata auto-rollover, multiple-certificate support, SCIM token lifecycle | Notification emails, who activates new certificates and when |
What Entra Tells You (and Whom)
| Signal | What it covers | Who sees it and caveats (Microsoft) |
|---|---|---|
| SAML certificate expiry emails | Sent 60, 30 and 7 days before a SAML signing certificate expires; sender azure-noreply@microsoft.com | By default only the administrator who added the application; up to five addresses can be set (use a distribution list for more). If set through Graph or PowerShell, open the SAML certificate page in the admin center to confirm the notification registration; otherwise the emails might not be sent |
| Recommendation: Renew expiring application credentials | Credentials on an application registration that expire within the next 30 days | Entra ID > Overview > Recommendations; readable by Reports Reader, Security Reader or Global Reader. Currently listed as preview; the page lists a required licence of Workload ID. Data is processed daily and can lag, up to 72 hours at times. Email notifications for recommendations (preview) go to the Application Administrator role, and with PIM the recipient must be elevated or no one gets the email |
| Recommendation: Renew expiring service principal credentials | The same idea for credentials on service principals | Listed in Microsoft's table, also preview; read its page for the detail |
| Usage & insights: Application credential activity (preview) | For every application credential: its type (certificate or secret), last used date and expiration date, in one list | Entra ID P1 or P2; Reports Reader at least. The nearest thing to a built-in register |
| Recommendation: Remove unused credentials from applications | Old credentials no longer used | Helps with the "remove" step of Chapter 8; preview |
The Expiry Register
The register is a list, one row per credential per client, that your team owns. It is deliberately a plain spreadsheet or ticketing-system view. Its value is that someone looks at it on a schedule.
| Column | Why it's there |
|---|---|
| Client and tenant ID | From the tenant card (Chapter 1) |
| Integration and application (client) ID | Which object; search by ID, not name |
| Arrangement and pattern | A/B/C and OIDC / SAML / client credentials / SCIM, so you know who acts |
| Credential type, description and Key ID (or thumbprint) | Distinguishes the several secrets one app may hold; Microsoft's own check is matching the Key ID (Chapter 8). The value is never recorded |
| Created and expires (date) | The date everything hangs on. Record the date as shown in the portal; note the time zone question below |
| Owner (client) and owner (us) | A named person and a team mailbox on each side |
| Notification recipients set | Who Entra emails (SAML), and whether it was verified |
| Renewal plan and window | Who creates, who installs, when (a quiet period for single-certificate products) |
| Last verified | The date someone last looked at the live portal value |
Where the data comes from
- Your own tenant: the Application credential activity report, or Microsoft Graph. The
passwordCredentialobject hasdisplayName,startDateTime,endDateTime(always UTC),keyIdand ahint(first three characters). The secret text itself is returned only once, when created; there is no way to retrieve it later. - A client's tenant: you rarely have the access to run reports, so the data arrives by request: the administrator reads dates to you on a screen share (Chapter 5), or exports the Application credential activity list. Add it to the register the same day.
- Your product: if it stores the credential, it should also store (and show) the expiry date and last-success time, so the register can be checked against what is in use.
When to Renew: Lead Times
Entra's own signals suggest the rhythm: 60, 30 and 7 days for SAML emails; a 30-day window for the credential recommendation. A practical schedule for your register, scaled to how hard the client is to coordinate:
| Days before expiry | Action |
|---|---|
| 90 | Register flags it; send the first client reminder (template below); confirm the owner still exists |
| 60 | Agree the renewal window; for SAML, confirm notification recipients; check the client's lifetime policy |
| 30 | Create the new credential alongside the old one (it does no harm, since the old one keeps working); for SAML create the Inactive certificate |
| 14 | Install and prove (Chapter 8); activate SAML certificates; leave the old credential in place |
| 7 | Escalate if not done; the last chance for a calm renewal |
| After expiry + safe period | Remove the old credential; update the register with the new date; close the loop with the client |
Choosing Lifetimes and Credential Types
- Client secrets have a maximum lifetime of 24 months; Microsoft recommends under 12. Longer isn't available, so "set it and forget it" doesn't exist for secrets.
- SAML signing certificates default to three years and can be set to any date up to three years ahead; the date can't be edited after saving.
- Certificates over secrets. Microsoft recommends certificates for production. A certificate doesn't remove expiry, but a CA-issued certificate kept in a vault such as Azure Key Vault is easier to renew in a controlled way than a pasted string.
- No stored secret at all, where possible. Microsoft's guidance for migrating away from secrets points to managed identities (for workloads running in Azure) and federated identity credentials (for supported external workloads). These apply to your workloads, and only where the platform supports them; they are not something a client can switch on for a product that does not support them.
- The client's policy may decide for you. Application management policies can limit the maximum lifetime of passwords and certificates, or block adding secrets (Chapter 4). Ask during onboarding what their limits are, and design for the shortest.
- Don't confuse short with safe. Short lifetimes shrink the damage of a leak but multiply the number of renewals. If you shorten lifetimes, the register and the runbook must be solid first.
Making Rotation Boring in Your Product
This is the part you control completely, and it is where most recurring pain is removed. Ask your engineering team for these, in rough priority order:
- Accept two credentials at once. Support an old and a new secret or certificate in parallel, so the sequence create, install, prove, remove never involves downtime or a precisely timed swap.
- For SAML, read the federation metadata URL regularly (Microsoft recommends at least every 24 hours), add newly published signing certificates as secondary, and promote them when Entra activates them. Then the client's rollover needs no action from you.
- Show the expiry. The connection settings page should display which credential is in use, its expiry date if it can be known, and the date of the last successful sign-in.
- Warn early and loudly. Product-side warnings at 60, 30 and 7 days to the client's named contacts, and an alert to your own support team.
- Make "validate the connection" informative. Distinguish "credential expired" (7000222), "credential invalid" (7000215), "consent missing" and "blocked by Conditional Access" with plain-language messages, instead of a generic failure. Chapters 6 to 8 give you the mapping.
- Never log or display the secret once stored; record only a short hint, such as the first three characters (the same approach as Graph's
hint).
Catching Failures Early
If prevention fails, you want the first failure, not the thousandth. Two layers:
- In your product: alert your support team on the first failed token request or provisioning cycle for any client, with the error code attached.
- In the client's tenant: an administrator with at least Security Administrator can send the Entra logs to a Log Analytics workspace through Entra ID > Monitoring & health > Diagnostic settings and build alerts on failed sign-ins for the integration's application. This is a client-side project with its own cost and decision-making, so offer it; don't assume it. Chapter 7's retention figures (7 days Free, 30 days P1 and P2) are the reason many clients benefit.
Client-Facing Prevention
Onboarding checklist (ask once, record the answers)
- Named owner for the integration, and a shared mailbox rather than one person.
- Notification recipients set on the SAML certificate (up to five; use a distribution list).
- Their application management policy limits, if any.
- Which licence they hold (P1/P2), because it decides log retention and which reports exist.
- How a renewal is requested and approved on their side, and the usual lead time.
- Whether they allow us a read role such as Reports Reader for diagnosis.
A renewal reminder you can send at 90 days
Hands-On Exercises
All three use fictional organisations and values. Never put real secrets, tokens or tenant details into practice notes.
Today is 1 October 2026. You support four integrations: (1) Fabrikam, arrangement B, client secret expiring 20 October 2026; (2) Contoso, SAML signing certificate expiring 5 December 2026, notification emails go to one person who left in August; (3) Northwind, arrangement A, your own multitenant app's secret expiring 1 March 2027; (4) Tailspin, certificate credential expiring 9 October 2026, no owner recorded. Build the register rows, work out for each which step of the lead-time schedule it is already at, rank them by urgency, and write the single next action for each.
๐ View solutionWrite the 30-day reminder to Fabrikam's IT manager, who replied to the 90-day reminder with "we'll sort it" and has not been in touch since. The message must be short, say plainly what happens if nothing is done, propose a specific renewal slot, name what you need from them and what you will do, and avoid blame and jargon. Then list the three things you do inside your own team that same day.
๐ View solutionPost-incident review: Contoso's SAML certificate expired. Entra's expiry emails went to an administrator who left three months earlier. Your product accepts one certificate only. The renewal took four hours of downtime on a weekday. List at least six systemic fixes (not "be more careful"), sort them into what your team controls and what you can only request of the client, and pick the two with the biggest effect, explaining why.
๐ View solutionChapter 9 Quick Reference
- Expiry is predictable; incidents come from no list, no owner, wrong recipient or risky renewal
- Arrangement decides your reach: A you control everything; B/C you control your product's side and request the rest
- SAML cert emails at 60/30/7 days, default to the app's creator, up to five recipients; verify the notification registration if set by script
- Recommendation "Renew expiring application credentials" flags credentials expiring in 30 days (preview; daily, up to 72h lag; emails to the Application Administrator role, PIM caveat)
- Usage & insights Application credential activity (preview) lists type, last used and expiry; needs P1/P2 and at least Reports Reader
- Register columns: client, tenant, app ID, arrangement, type, description, Key ID/thumbprint, expiry, owners, notify set, verified; never the secret
- Schedule: 90 flag, 60 plan, 30 create new, 14 install and prove, 7 escalate; renew at least a week early
- Secrets max 24 months (under 12 recommended); SAML cert up to three years; prefer certificates; check the client's application management policies
- Product: accept two credentials, read metadata at least every 24 h, show expiry, warn early, informative validation, never log secrets
- Early detection: first-failure alert in your product; optional Log Analytics alerts in the client's tenant (Security Administrator)
- Onboarding: named owner and shared mailbox, notification recipients, policy limits, licence, renewal process, read-role permission