Every SAML enterprise application in Microsoft Entra ID signs its tokens with a certificate that expires, and when the application side is not updated in time, sign-in for that application stops for everyone at once. This guide is the end-to-end rollover procedure for one Entra ID enterprise application: find what is expiring, create the new certificate, get it trusted by the service provider, activate it, test, and retire the old one, with the order changed to fit how the application handles certificates. It is for identity administrators and application owners who run SAML single sign-on in Entra ID. Diagnosing a failure that has already happened is covered in the SAML SSO Errors Troubleshooting Guide; this page is about not getting there.
This is an independent guide from NHI Mgmt Group, based on Microsoft's public documentation as of November 2026. It is not sponsored or reviewed by Microsoft. Product features change, so confirm settings against Microsoft's current documentation.
Key takeaways
- The order depends on the application: if the service provider can trust two certificates or reads Entra metadata, add the new certificate there first and activate in Entra later; if it holds one certificate, both sides must switch in the same change window.
- A new certificate starts Inactive: Entra ID keeps signing with the current certificate until you select Make certificate active, so creating one early is safe, with one exception covered below.
- Overlap is the whole point: Microsoft's renewal guidance is to create the new certificate with dates that overlap the old one and upload it to the application before the old one expires.
- Expiry emails go to whoever added the app: Entra ID warns 60, 30 and 7 days before expiry, to up to five addresses. Replace the default individual with a monitored group mailbox.
- Test before you retire: keep the old certificate on the service provider until a real sign-in with the new one succeeds, so rollback is one click in Entra.
When you need this
- An expiry notice arrived: from
[email protected], at 60, 30 or 7 days before a SAML certificate expires. - Scheduled rotation: your policy rotates signing certificates before the default three-year lifetime ends.
- Suspected key compromise: forged SAML tokens are a known attack path (MITRE ATT&CK T1606.002 SAML Tokens). An application signing certificate replaced under suspicion should be rotated immediately and the old one removed, not left inactive. See the Golden SAML and Federation Trust Abuse Defence Guide for the wider response.
- Algorithm change: moving an application from SHA-1 to SHA-256 is often done in the same window.
Know what you are rotating
| Item | What Microsoft documents | What it means for the rollover |
|---|---|---|
| Default certificate | Auto-generated when SAML is configured; self-signed; valid for three years; the expiry date cannot be changed after saving | To change the date you create a new certificate |
| New certificate | Created from SAML Signing Certificate with New Certificate; expiry defaults to three years and can be set to any date up to three years ahead; appears as Inactive with its thumbprint | Safe to create in advance, except when the current certificate has already expired |
| Activation | Make certificate active on the new row; the previous certificate becomes Inactive | This is the cutover moment; reversing it is the rollback |
| Signing option | Sign SAML assertion (default for most gallery apps), Sign SAML response, or Sign SAML response and assertion | Do not change it during rotation unless the application asks |
| Signing algorithm | SHA-256 (default, recommended) or SHA-1 only if the application supports nothing else | Change only with the application owner's confirmation |
| Encryption certificate | A separate, optional public-key certificate supplied by you or the vendor, used to encrypt assertions | Not part of signing rotation; it has its own lifecycle |
Two Microsoft warnings change the plan. First, if the current certificate has already expired and you create a new one, Entra ID considers the new certificate for signing even though it is not yet active, so creating it is itself the cutover. Second, if both an expired certificate and an inactive but valid certificate exist on the app, Entra ID uses the valid one automatically, and users may see an outage if the application has not been updated.
Decide the rollover pattern
| Service provider behaviour | Pattern | Downtime |
|---|---|---|
| Reads Entra federation metadata by URL and refreshes it | Create new certificate, wait for the application to pick it up, then activate | None if the refresh has happened |
| Accepts two trusted signing certificates (primary and secondary) | Create, download, upload as the second certificate, activate in Entra, then remove the old one from the application | None |
| Holds exactly one certificate | Create in advance, then in a change window upload to the application and activate in Entra together | Minutes, during the window |
| Does not validate certificate expiry | As for one certificate, but do not create the new certificate until the window | Minutes, during the window |
The application's configuration guide or the View step-by-step instructions panel for a gallery app usually says which format it needs, and the vendor's documentation says whether it accepts two certificates. Microsoft advises application vendors to support primary and secondary signing certificates and to check Entra metadata at least every 24 hours. If the application uses metadata, confirm how often it actually refreshes: a daily refresh means creating the certificate at least a day before activation.
Small versus large estates: with a handful of SAML apps, the portal procedure below is enough. With dozens or hundreds, track every certificate's expiry centrally, group applications by pattern, and automate inventory through Microsoft Graph so no app depends on one person's inbox.
Before you start
- Role: at least Cloud Application Administrator (or Application Administrator) in Entra ID, plus administrator access to the application's SAML settings.
- Contacts: the application owner and, for SaaS, the vendor support route, in case the application side needs their help.
- Current state: note the active certificate's thumbprint and expiry date, the signing option and algorithm, and the format the application expects (Base64, raw, PEM or federation metadata XML).
- Test users: at least one account assigned to the app that can sign in during the change, including through IdP-initiated access from My Apps if users start there.
- Change window: for one-certificate applications, agree a time with the application owner well before the 7-day email.
Step-by-step
1. Find what is expiring
- In the Microsoft Entra admin center, go to Entra ID > Enterprise apps > All applications, open the application and select Single sign-on.
- Under SAML Certificates, read the status and expiration date of the active certificate.
- For an estate-wide view, query service principals with Microsoft Graph and read their
keyCredentials, whose end dates show when each signing certificate expires. ThepreferredTokenSigningKeyThumbprintproperty on a SAML service principal identifies which certificate signs responses.
2. Fix the notification list
- Open the SAML Signing Certificate page (the Edit pencil under SAML Certificates).
- Add a group mailbox owned by the identity team to Notification email addresses (up to five addresses in total) and select Save.
- If you set notifications through Graph or PowerShell, open this page in the admin center to confirm them: Microsoft warns that otherwise the emails might not be sent.
3. Create the new certificate
- On the SAML Signing Certificate page, select New Certificate.
- Set the expiry date with the calendar icon. Match your rotation policy; the maximum is three years from today.
- Select Save. The certificate is listed as Inactive. Record its thumbprint.
- For automation, the Graph
addTokenSigningCertificateaction on the service principal creates an equivalent self-signed certificate (aSignand aVerifykey credential plus a password credential for the PFX), valid for three years by default. It needsApplication.ReadWrite.Alldelegated, orApplication.ReadWrite.OwnedByas an application permission.
4. Get the new certificate trusted by the service provider
- Use the ellipsis on the new certificate row to download it in the format the application needs, or give the application the app-specific federation metadata.
- Two-certificate applications: upload it now as an additional trusted certificate.
- Metadata applications: trigger a refresh if the application offers one, or wait for its refresh interval, then confirm the new thumbprint is listed in the application.
- One-certificate applications: wait for the change window; do steps 4 and 5 back to back.
5. Activate in Entra ID
- On the new certificate row select the ellipsis, then Make certificate active. The old certificate becomes Inactive.
- Leave the signing option and algorithm unchanged unless this window is also the agreed algorithm change.
6. Test
- Sign in with a test user through the application's own login (SP-initiated) and through My Apps (IdP-initiated) if both are used.
- Confirm the application owner sees successful sign-ins in its own logs.
- Check Entra sign-in logs for the application: successful Entra sign-ins with application errors point to a trust problem on the service provider side.
7. Retire the old certificate
- When sign-in is confirmed and any agreed observation period has passed, remove the old certificate from the application's trusted list.
- Remove the inactive certificate from Entra ID so it cannot be reactivated by mistake. Do this immediately if the rotation was triggered by suspected compromise.
- Update your certificate inventory with the new thumbprint and expiry date and set the next review.
Verify it worked
- Entra side: the new certificate is Active with the expected expiry; no expired certificate remains on the app.
- Application side: only the new thumbprint is trusted after retirement, and sign-ins succeed for both entry points.
- Audit trail: Entra audit logs show the change under the ApplicationManagement category, for example Update service principal and Add service principal credentials, by the expected administrator at the expected time.
- Notifications: the notification list contains the group mailbox.
Rollback and common errors
If sign-in fails after activation and the old certificate has not expired, select Make certificate active on the old certificate to restore the previous state, then fix the application side and try again. This is why the old certificate stays on both sides until testing passes. If the old certificate has already expired there is no rollback: the application has to trust the new certificate.
| Symptom after activation | Likely cause | Fix |
|---|---|---|
| Application reports an invalid signature or unknown certificate | New certificate not uploaded, or metadata not yet refreshed | Roll back, upload or refresh, retry |
| Signature error only on some requests | Signing option changed, for example response signed but application validates the assertion | Restore the previous Signing Option |
| Application rejects the algorithm | Algorithm changed during rotation | Restore the previous Signing Algorithm and plan the change separately |
| Certificate parse error on upload | Wrong encoding | Download again in the format the application lists (Base64, raw, PEM or XML) |
| Outage with no activation by anyone | Old certificate expired and Entra switched to the valid inactive one | Upload the new certificate to the application at once |
For deeper diagnosis with captured SAML responses, see the SAML SSO Errors Troubleshooting Guide.
Common failure patterns
- Notices to a leaver: the default recipient is the admin who added the app, often years ago. Use a group mailbox.
- Activating before the application trusts the new certificate: the most common self-inflicted outage. Activate last for two-certificate and metadata applications.
- Creating a new certificate after the old one expired, outside a window: creation becomes the cutover, because Entra uses the valid certificate.
- Assuming metadata applications update instantly: many refresh on a schedule. Confirm the thumbprint has arrived before activating.
- Changing algorithm or signing option at the same time: two changes in one window make the failure hard to read.
- Leaving old certificates trusted forever: the application keeps accepting tokens signed with a key you meant to retire.
Detection and measurement
- Certificates expiring within 60 days across all SAML apps, reviewed weekly.
- Apps with a group mailbox in their notification list: target 100%.
- SSO incidents caused by certificate expiry: target zero per year.
- Lead time: days between rollover and expiry; aim to finish before the 30-day email.
- Unexpected credential changes: alert on Add service principal credentials and Update service principal events outside approved changes. See the Entra ID Audit Log Detection Guide.
Framework mapping
| Framework | Reference | How it applies |
|---|---|---|
| NIST SP 800-53 Rev. 5 | SC-12 Cryptographic Key Establishment and Management; SC-17 Public Key Infrastructure Certificates; IA-5 Authenticator Management | Planned key and certificate replacement for the signing key |
| NIST CSF 2.0 | PR.AA-01 | Credentials for services are managed through their lifecycle |
| MITRE ATT&CK | T1606.002 SAML Tokens; T1484.002 Trust Modification | Forged tokens and tampering with federation trust; watch credential changes on SAML apps |
Practitioner checklist
- Inventory every SAML app's active certificate expiry, centrally.
- Put a group mailbox in every app's notification list and confirm it in the portal.
- Record each app's pattern: metadata, two certificates, or one certificate.
- Create the new certificate early, unless the old one has expired or the app does not check expiry.
- Get the application to trust the new certificate before activating, where it can.
- Activate with Make certificate active and test both sign-in entry points.
- Keep the old certificate for rollback until tests pass, then remove it from both sides.
- Change signing option or algorithm in a separate window.
- Alert on credential changes to SAML service principals outside approved changes.
Standards and references
- Microsoft Learn: Manage certificates for federated single sign-on
- Microsoft Learn: Advanced certificate signing options in a SAML token
- Microsoft Graph: servicePrincipal addTokenSigningCertificate
- Microsoft Graph: servicePrincipal resource type
- Microsoft Learn: Federation metadata
- Microsoft Learn: Configure SAML token encryption
- Microsoft Learn: Audit log activities
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls
Related NHI Mgmt Group resources: SAML SSO Errors Troubleshooting Guide, Golden SAML and Federation Trust Abuse Defence Guide, SAML Security Guide, Entra ID Applications and Consent Guide.