Join our Newsletter — 33% off our NHI Course
Home› Guides› How to rotate a SAML signing certificate in…
Guide Authentication

How to rotate a SAML signing certificate in Entra ID without breaking SSO: a step by step rollover plan

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 15 November 2026 12 min read
On this page

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

ItemWhat Microsoft documentsWhat it means for the rollover
Default certificateAuto-generated when SAML is configured; self-signed; valid for three years; the expiry date cannot be changed after savingTo change the date you create a new certificate
New certificateCreated 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 thumbprintSafe to create in advance, except when the current certificate has already expired
ActivationMake certificate active on the new row; the previous certificate becomes InactiveThis is the cutover moment; reversing it is the rollback
Signing optionSign SAML assertion (default for most gallery apps), Sign SAML response, or Sign SAML response and assertionDo not change it during rotation unless the application asks
Signing algorithmSHA-256 (default, recommended) or SHA-1 only if the application supports nothing elseChange only with the application owner's confirmation
Encryption certificateA separate, optional public-key certificate supplied by you or the vendor, used to encrypt assertionsNot 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 behaviourPatternDowntime
Reads Entra federation metadata by URL and refreshes itCreate new certificate, wait for the application to pick it up, then activateNone 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 applicationNone
Holds exactly one certificateCreate in advance, then in a change window upload to the application and activate in Entra togetherMinutes, during the window
Does not validate certificate expiryAs for one certificate, but do not create the new certificate until the windowMinutes, 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

  1. In the Microsoft Entra admin center, go to Entra ID > Enterprise apps > All applications, open the application and select Single sign-on.
  2. Under SAML Certificates, read the status and expiration date of the active certificate.
  3. For an estate-wide view, query service principals with Microsoft Graph and read their keyCredentials, whose end dates show when each signing certificate expires. The preferredTokenSigningKeyThumbprint property on a SAML service principal identifies which certificate signs responses.

2. Fix the notification list

  1. Open the SAML Signing Certificate page (the Edit pencil under SAML Certificates).
  2. Add a group mailbox owned by the identity team to Notification email addresses (up to five addresses in total) and select Save.
  3. 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

  1. On the SAML Signing Certificate page, select New Certificate.
  2. Set the expiry date with the calendar icon. Match your rotation policy; the maximum is three years from today.
  3. Select Save. The certificate is listed as Inactive. Record its thumbprint.
  4. For automation, the Graph addTokenSigningCertificate action on the service principal creates an equivalent self-signed certificate (a Sign and a Verify key credential plus a password credential for the PFX), valid for three years by default. It needs Application.ReadWrite.All delegated, or Application.ReadWrite.OwnedBy as an application permission.

4. Get the new certificate trusted by the service provider

  1. 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.
  2. Two-certificate applications: upload it now as an additional trusted certificate.
  3. 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.
  4. One-certificate applications: wait for the change window; do steps 4 and 5 back to back.

5. Activate in Entra ID

  1. On the new certificate row select the ellipsis, then Make certificate active. The old certificate becomes Inactive.
  2. Leave the signing option and algorithm unchanged unless this window is also the agreed algorithm change.

6. Test

  1. Sign in with a test user through the application's own login (SP-initiated) and through My Apps (IdP-initiated) if both are used.
  2. Confirm the application owner sees successful sign-ins in its own logs.
  3. 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

  1. When sign-in is confirmed and any agreed observation period has passed, remove the old certificate from the application's trusted list.
  2. 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.
  3. 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 activationLikely causeFix
Application reports an invalid signature or unknown certificateNew certificate not uploaded, or metadata not yet refreshedRoll back, upload or refresh, retry
Signature error only on some requestsSigning option changed, for example response signed but application validates the assertionRestore the previous Signing Option
Application rejects the algorithmAlgorithm changed during rotationRestore the previous Signing Algorithm and plan the change separately
Certificate parse error on uploadWrong encodingDownload again in the format the application lists (Base64, raw, PEM or XML)
Outage with no activation by anyoneOld certificate expired and Entra switched to the valid inactive oneUpload 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

FrameworkReferenceHow it applies
NIST SP 800-53 Rev. 5SC-12 Cryptographic Key Establishment and Management; SC-17 Public Key Infrastructure Certificates; IA-5 Authenticator ManagementPlanned key and certificate replacement for the signing key
NIST CSF 2.0PR.AA-01Credentials for services are managed through their lifecycle
MITRE ATT&CKT1606.002 SAML Tokens; T1484.002 Trust ModificationForged 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

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.

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 15 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.