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.

What this chapter is not
Scripting and alerting are covered at overview level only. Microsoft changes the exact reports, preview features and licensing often (several relevant items below are marked preview), so the chapter names what exists and what each is good for, and tells you to verify the current details before you promise a client something specific.

Why These Incidents Recur

Root causeWhat it looks likeSystemic fix
No one has the listThe expiry date exists only in the portal; no one looked until it failedA register (below)
Reminders go to the wrong placeEntra's emails go to whoever created the app: someone who left, or an unread mailboxShared or distribution-list recipients; verify them
No one owns renewalThe client assumes the vendor will renew; the vendor assumes the client willAn agreed owner on each side, written down
Renewal is riskyPast renewals broke things, so people delay themA rehearsed create-install-prove-remove runbook (Chapter 8)
Two-sided mismatchRenewed in Entra but not in the product, or the reverseOne checklist covers both sides; product shows what it is using
Short surprise lifetimeA client's policy caps lifetimes lower than anyone expectedAsk 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.

ArrangementCredentials owned byYou can do directlyYou must ask the client for
A: your multitenant appYou (registration in your tenant)Everything: register, owners, reminders, rotation, longer-term credential designMainly consent, assignment and Conditional Access, not credentials (Chapter 6)
B: client creates the registrationThe client (their tenant)Your product's side: where the credential is stored, warnings, overlap supportExpiry dates, owners, notification recipients, rotation scheduling
C: SAML or SCIM to your productShared: Entra signs (client side), your product trusts or accepts (your side)Metadata auto-rollover, multiple-certificate support, SCIM token lifecycleNotification emails, who activates new certificates and when

What Entra Tells You (and Whom)

SignalWhat it coversWho sees it and caveats (Microsoft)
SAML certificate expiry emailsSent 60, 30 and 7 days before a SAML signing certificate expires; sender azure-noreply@microsoft.comBy 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 credentialsCredentials on an application registration that expire within the next 30 daysEntra 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 credentialsThe same idea for credentials on service principalsListed 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 listEntra ID P1 or P2; Reports Reader at least. The nearest thing to a built-in register
Recommendation: Remove unused credentials from applicationsOld credentials no longer usedHelps with the "remove" step of Chapter 8; preview
Microsoft documents SAML emails; don't assume the same for secrets
The page for managing certificates describes the 60/30/7 email for SAML signing certificates. The documents consulted for client secrets and certificate credentials describe the 30-day recommendation and the credential-activity report, but not an automatic email to a named owner. Treat "Entra will warn us" as true for SAML certificates and partly true for everything else, and build your own warning for the rest.

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.

ColumnWhy it's there
Client and tenant IDFrom the tenant card (Chapter 1)
Integration and application (client) IDWhich object; search by ID, not name
Arrangement and patternA/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 setWho Entra emails (SAML), and whether it was verified
Renewal plan and windowWho creates, who installs, when (a quiet period for single-certificate products)
Last verifiedThe 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 passwordCredential object has displayName, startDateTime, endDateTime (always UTC), keyId and a hint (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.
client,tenant_id,integration,app_id,arrangement,type,description,key_id,expires,client_owner,our_owner,notify_set,verified Fabrikam,1111...,Acme Reports Sync,2222...,B/client-creds,secret,"prod 2026-10",aaaa...,2027-09-14,j.smith@fabrikam.example,integrations@ourco.example,n/a,2026-10-02 Contoso,5555...,Acme SSO,6666...,C/SAML,signing cert,"Entra generated",bbbb...,2026-12-05,it-ops@contoso.example,integrations@ourco.example,yes (3 addrs),2026-09-30 Northwind,7777...,Acme multi-tenant,8888...,A/OIDC,secret,"vendor 2026",cccc...,2027-03-01,(none - ours),integrations@ourco.example,n/a,2026-10-01

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 expiryAction
90Register flags it; send the first client reminder (template below); confirm the owner still exists
60Agree the renewal window; for SAML, confirm notification recipients; check the client's lifetime policy
30Create the new credential alongside the old one (it does no harm, since the old one keeps working); for SAML create the Inactive certificate
14Install and prove (Chapter 8); activate SAML certificates; leave the old credential in place
7Escalate if not done; the last chance for a calm renewal
After expiry + safe periodRemove the old credential; update the register with the new date; close the loop with the client
Time of day is not verified
The documents consulted give expiry dates but not the hour or time zone at which a secret stops working. Don't plan to renew "on the last day". Renew at least a week early, so the exact moment never matters.

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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

Subject: Action needed by <date>: renewal of the <product> connection to your Microsoft Entra tenant Hello <name>, The credential that lets <product> connect to your Microsoft Entra tenant is due to expire on <date> (about 90 days from now). If it isn't renewed first, your users will not be able to sign in to <product> (or <nightly sync will stop>) from that day. Renewing takes about ten minutes, and nothing is removed until we have confirmed the new one works. 1. Please tell us who on your side will do this, and a good week to schedule it. 2. We will send you the exact steps and join a short call to test afterwards. We will remind you again at 30 days. If you would like the reminders sent to a shared mailbox instead of an individual, let us know the address. Thank you, <name>
What you can tell the client
"Credentials like this are designed to expire, for security. It is a routine renewal, not a fault, and we'll remind you well in advance. If you tell us who should receive the reminders, a shared mailbox is best because people change roles. The renewal itself is short and doesn't affect your users when it's done in the right order."

Hands-On Exercises

All three use fictional organisations and values. Never put real secrets, tokens or tenant details into practice notes.

Exercise 1

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 solution
Exercise 2

Write 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 solution
Exercise 3

Post-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 solution

Chapter 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