Skip to main content
AppAlert

AADSTS700027: client assertion failed signature validation

Reviewed

On this page
Error message returned by Microsoft Entra
AADSTS700027: Client assertion failed signature validation.

What the message means

The app signed in to Microsoft Entra ID (formerly Azure AD) with a certificate, and Entra rejected the signed request. Microsoft's error reference describes the code as: "Client assertion failed signature validation."

Behind the short description sit several causes. The full message usually includes a Reason that tells you which one. Read it before you change anything.

Microsoft notes that error codes and messages can change. Match the message text as well as the code.

Which case is yours

The certificate expired. The message says the certificate "is expired on application" and gives the dates of the key Entra found. This example is from a Microsoft Q&A thread:

AADSTS700027: The certificate with identifier used to sign the client assertion is expired on application. [Reason - The key used is expired., Found key 'Start=<start>, End=<end>'

Upload a new certificate and switch the workload to it. The app certificate renewal guide has the steps.

The certificate is not registered on the app. The message says "is not registered on application" with Reason - The key was not found, as in this Q&A thread. The workload signs with a certificate whose public key the app registration does not hold. Typical causes: the new certificate was installed on the server but never uploaded, the workload points to the wrong thumbprint, or it uses the client ID of another app.

The key was revoked. The message says the client assertion "is using a key which is revoked". Follow Revoked credential.

The assertion itself is malformed. Custom code that builds the signed token can fail validation even with a valid certificate. Check it against Microsoft's certificate credential format, including the thumbprint header and the signing algorithm. Libraries such as MSAL build the assertion for you.

Fix it

  1. List the certificates registered on the app with Azure CLI. Note each certificate's end date and identifier.

    az ad app credential list --id '<application-id>' --cert --output table
    

    In the portal, open App registrations, select the app, then Certificates & secrets, Certificates. The portal shows each certificate's thumbprint, start date, and expiry.

  2. Find the thumbprint of the certificate the workload signs with, from its certificate store or Key Vault. Compare it with the registered certificates. Unless someone set it explicitly, a certificate's customKeyIdentifier is its thumbprint.

  3. If the workload's certificate is expired, create or request a new certificate and upload its public part to the app. Keep the old certificate registered until every workload has switched. The app certificate renewal guide covers the portal, Azure CLI, and Graph paths.

  4. If the workload's certificate is valid but not registered, upload its public certificate (.cer, .pem, or .crt), or point the workload to a certificate that is registered.

  5. Test a fresh token request from each workload. Confirm the key ID in the sign-in logs with Identify the active credential, then remove the old certificate.

Where the old credential still lives

With a certificate, the app registration holds only the public key. The private key lives with each workload that signs in, and every one of them must switch:

  • Key Vault certificates referenced by App Service, Functions, or pipelines.
  • The Windows certificate store or PEM files on servers, often referenced by thumbprint in a configuration file.
  • Azure DevOps service connections and other CI systems that sign in with a certificate.
  • Integration products and agents that store their own copy of the certificate.

Prevent the next one

Plan a certificate rollover well before the end date. An app registration can hold several certificates at once, so register the new one first, move each workload, and only then remove the old one.

Track the end date of every registered certificate, not only of secrets. Monitor Entra app credential expiration shows how to list both with Microsoft Graph. App secret expiration notifications explains what Entra sends on its own.

FAQ

Does AADSTS700027 always mean the certificate expired?

No. It covers every failed signature check on a client assertion: an expired certificate, a certificate the app does not hold, a revoked key, or a malformed assertion. The Reason text in the full message tells them apart.

I uploaded a new certificate. Why does AADSTS700027 continue?

The workload still signs with the old private key. Uploading to the app registration changes nothing on the workload side. Install the new certificate where the workload reads it and update any configured thumbprint.

Can an app registration have two certificates at the same time?

Yes. The certificate list on an app registration holds several entries, which is what makes a rollover without downtime possible.

No. This code concerns certificates an app uses to sign in to Entra. A SAML signing certificate is the one Entra uses to sign tokens for an enterprise application, and it fails differently. See SAML signing certificate expired.