Skip to content
← All field notes

Field Notes · Sheet 02 / 30 · Identity and federation

SAML 2.0 vs OpenID Connect

What changes day to day between SAML 2.0 and OpenID Connect in Entra ID: who signs the token, what expires, and who has to roll it over.

Bradley Baker · · 3 min read

Side-by-side sign-in flows. SAML 2.0: app sends an authentication request, user signs in to Entra, Entra posts a signed XML assertion to the Reply URL. OpenID Connect: authorize endpoint, sign in and consent, authorization code redeemed at the token endpoint for an ID token and access token. A table compares signing, token format, API access and what expires.
Sheet 02 / 30 · Drawn by Bradley BakerFull size

Every SAML app you add to Entra ID gets its own signing certificate, valid for three years by default. Entra emails you 60, 30, and 7 days before it expires, and then someone has to update the app. That difference between SAML 2.0 and OpenID Connect matters more day to day than the protocol diagrams, and this note follows it through both flows on the sheet.

SAML 2.0: the app holds a certificate

The app redirects you to Entra with an authentication request. You sign in. Entra posts a signed XML assertion to the app's Reply URL, also called the Assertion Consumer Service URL. The app trusts the assertion because it holds that app's signing certificate.

The Reply URL list is part of the security model. Entra accepts a signed SAML request but doesn't verify its signature. It relies instead on the reply URLs registered for the app, and sends a token only to one of those, so keep the list to URLs the app actually uses.

OpenID Connect: the app reads published keys

The app sends you to the /authorize endpoint. You sign in and consent. The app gets an authorization code, redeems it at the /token endpoint, and receives an ID token, which is a signed JWT, plus an access token. The ID token comes back only when the app asks for the openid scope.

The app validates tokens against signing keys Entra publishes, so there's usually no per-app certificate for you to roll. The keys are listed at the jwks_uri in Entra's OpenID configuration document, served from /.well-known/openid-configuration. Entra rolls them periodically and, in an emergency, immediately, with no set time between rolls. Microsoft's guidance is to use a standard authentication library that keeps the key list current, because an app that checks signatures against an old key rejects valid tokens.

PKCE belongs in every one of these apps. Microsoft's protocol reference recommends it for all application types, public and confidential clients alike, and requires it for single-page apps that use the authorization code flow.

SAML 2.0OpenID Connect
TokenSigned XML assertionJWT ID token and access token
SigningPer-app certificate, 3-year defaultKeys Entra publishes
Calls APIsNot on its ownYes, with access tokens
Watch forCertificate expiry. Entra emails at 60, 30, and 7 days.Secret and certificate expiry
The comparison on the sheet.

Rolling a SAML certificate without an outage

A certificate's expiration date can't be changed after it's saved, so a rollover always means a new certificate. Microsoft's renewal procedure runs in this order:

  1. Create the new certificate on the app's SAML Signing Certificate page, with dates that overlap the current one. Any expiration date up to three years out is allowed.
  2. If the app can roll over on its own, reading the new certificate from Entra's federation metadata, make the new certificate active and skip to the last step.
  3. If the app accepts only one certificate at a time, schedule a downtime window for the switch.
  4. Before the old certificate expires, download the new one in the format the app's setup instructions call for, upload it to the app, and make it active in Entra.
  5. Sign in to the app to confirm the new certificate works.

Two details in the same guidance affect timing. Once a certificate has expired, Entra signs with any newer valid certificate on the app, even one that isn't active yet, and an app still holding the old certificate can stop accepting sign-ins. Meanwhile, an app that doesn't check expiration keeps accepting an expired certificate that still matches. For apps like that, Microsoft says to create the replacement only inside the scheduled maintenance window.

Make the expiry emails reach someone

The 60, 30, and 7-day notices go only to the admin who added the app until you change the list. Entra takes up to five addresses, that admin's included, so use a distribution list to reach more people. The mail comes from azure-noreply@microsoft.com, which Microsoft suggests adding to your contacts so it stays out of spam.

If you set the notification addresses with Microsoft Graph or PowerShell, open the app's SAML settings in the admin center and save them there too. Microsoft notes that the expiry emails might not be sent otherwise.

OIDC apps still expire

OIDC apps that are confidential clients hold client secrets or certificates, and both have expiration dates. Microsoft recommends certificate credentials over secrets. Public clients, which include native and single-page apps, must not use either one to redeem an authorization code. Put the confidential clients' credentials on the same calendar as the SAML certificates.

The post ended on a question worth answering before the next notice arrives: how many SAML signing certificates in your tenant expire in the next 90 days?

Sources

  1. Tutorial: Manage certificates for federated single sign-onlearn.microsoft.com
  2. Microsoft identity platform and OAuth 2.0 authorization code flowlearn.microsoft.com
  3. OpenID Connect on the Microsoft identity platformlearn.microsoft.com
  4. Signing key rollover in the Microsoft identity platformlearn.microsoft.com
  5. Overview of AD FS application migrationlearn.microsoft.com
  • SAML 2.0
  • OpenID Connect
  • Entra ID
  • Certificates
  • PKCE
This note on LinkedIn

Recon log

Findings 0/46

0/16 behavior and secret eggs. Hardware finds depend on the machine you visit from.

Hardware details are read by your browser and stay there. When you find an egg, only its name is counted, with no identifier attached, and nothing is counted if Global Privacy Control or Do Not Track is on.

Display0/7

  • Undiscovered (not found yet)

    rare

    Hint: Visit on a very large display.

  • Undiscovered (not found yet)

    uncommon

    Hint: Some monitors are wider than others.

  • Undiscovered (not found yet)

    uncommon

    Hint: Two screens are better than one.

  • Undiscovered (not found yet)

    rare

    Hint: Turn a monitor on its side.

  • Undiscovered (not found yet)

    common

    Hint: Pixels per inch matter.

  • Undiscovered (not found yet)

    uncommon

    Hint: Faster than 60 frames a second.

  • Undiscovered (not found yet)

    common

    Hint: Colors beyond sRGB.

Hardware0/11

  • Undiscovered (not found yet)

    rare

    Hint: Bring a flagship graphics card.

  • Undiscovered (not found yet)

    legendary

    Hint: A GPU that lives in a rack.

  • Undiscovered (not found yet)

    common

    Hint: A Mac with Apple silicon.

  • Undiscovered (not found yet)

    rare

    Hint: A Windows machine built for heavy work.

  • Undiscovered (not found yet)

    rare

    Hint: A Mac built for heavy work.

  • Undiscovered (not found yet)

    rare

    Hint: Two dozen threads or more.

  • Undiscovered (not found yet)

    rare

    Hint: Windows, but not on x86.

  • Undiscovered (not found yet)

    uncommon

    Hint: The year of the Linux desktop.

  • Undiscovered (not found yet)

    uncommon

    Hint: A laptop that boots straight into a browser.

  • Undiscovered (not found yet)

    uncommon

    Hint: No graphics card at all.

  • Undiscovered (not found yet)

    common

    Hint: A laptop you can poke.

Environment0/11

  • Undiscovered (not found yet)

    uncommon

    Hint: Visit while your battery is nearly flat.

  • Undiscovered (not found yet)

    uncommon

    Hint: Your browser has a setting for saving data.

  • Undiscovered (not found yet)

    uncommon

    Hint: Visit very late at night.

  • Undiscovered (not found yet)

    common

    Hint: Visit on a day off.

  • Undiscovered (not found yet)

    uncommon

    Hint: A browser with a lion on it.

  • Undiscovered (not found yet)

    common

    Hint: A browser with a fox on it.

  • Undiscovered (not found yet)

    uncommon

    Hint: An accessibility setting that calms things down.

  • Undiscovered (not found yet)

    uncommon

    Hint: Tell websites not to track you.

  • Undiscovered (not found yet)

    rare

    Hint: Visit from the Lone Star State.

  • Undiscovered (not found yet)

    common

    Hint: A newer version of HTTP.

  • Undiscovered (not found yet)

    rare

    Hint: A very narrow window.

Behavior0/7

  • Undiscovered (not found yet)

    uncommon

    Hint: Drag the edge of your browser window around.

  • Undiscovered (not found yet)

    uncommon

    Hint: Reach the bottom of the page quickly.

  • Undiscovered (not found yet)

    uncommon

    Hint: Try printing this page.

  • Undiscovered (not found yet)

    common

    Hint: Toggle the theme a few times.

  • Undiscovered (not found yet)

    rare

    Hint: Lose your connection.

  • Undiscovered (not found yet)

    rare

    Hint: Plug in a controller and press a button.

  • Undiscovered (not found yet)

    uncommon

    Hint: Sign the guestbook.

Secrets0/10

  • Undiscovered (not found yet)

    rare

    Hint: A famous cheat code.

  • Undiscovered (not found yet)

    common

    Hint: There's a terminal in here somewhere.

  • Undiscovered (not found yet)

    uncommon

    Hint: Ask the terminal about your machine.

  • Undiscovered (not found yet)

    uncommon

    Hint: Ask the terminal for root.

  • Undiscovered (not found yet)

    rare

    Hint: sudo, but make it a job offer.

  • Undiscovered (not found yet)

    rare

    Hint: The most dangerous command there is.

  • Undiscovered (not found yet)

    legendary

    Hint: Open your browser's developer console.

  • Undiscovered (not found yet)

    uncommon

    Hint: Click the logo. Then keep clicking.

  • Undiscovered (not found yet)

    legendary

    Hint: Type the 82nd's favorite word anywhere on the page.

  • Undiscovered (not found yet)

    legendary

    Hint: Find every egg that doesn't depend on your hardware.

Finds are saved in this browser only.

guest@bradbaker-it.com:~