Skip to main content
AppAlert

Entra app credential revoked, not expired (AADSTS7005003)

Reviewed

On this page
Credential type
None
Resource type
Application
Blast radius
Workloads that sign in with the revoked credential
Likely first responder
Application operations team, when new token requests fail before the expiry date
Suggested owner
Application owner, with the identity and security teams investigating
Suggested planning buffer
0 calendar days

What breaks

A revoked credential cannot be used to get new tokens, even though its expiry date has not passed. The application's token requests fail with one of these Microsoft Entra errors, as listed in Microsoft's revoked credentials troubleshooting article:

| Error code | Error name | Revoked credential | | --- | --- | --- | | AADSTS7005003 | InvalidClientSecretRevokedKeysProvided | Client secret | | AADSTS7005004 | InvalidClientAssertionRevokedKeysProvided | Key used to sign a client assertion | | AADSTS700027 | InvalidClientAssertionRevokedKeysProvided | Key used to sign a client assertion | | AADSTS7005005 | FederatedIdentityCredentialRevoked | Federated identity credential | | AADSTS7005006 | TokenRevocationBlocksIssuance | Token issuance blocked for the request |

Microsoft notes that AADSTS700027 can also mean other client assertion validation failures. Match the message as well as the code: for a revoked key it says the client assertion "is using a key which is revoked."

Tokens issued before the revocation do not all stop at once. Some Microsoft resources invalidate them early. For other resources, they keep working until they expire, which can take up to 24 hours. The revoked credential cannot get a replacement token. See Microsoft's description of the effects.

How you notice

The workload starts failing with one of the errors above while the credential still shows a future expiry date. Because some existing tokens stay valid for up to 24 hours, the failure can appear hours after the revocation, as each workload needs a new token.

These errors mean revoked, not expired. An expired client secret fails with a different error; see Entra client secret expired. Renewing early or extending an expiry date does not fix a revoked credential.

Who revoked the credential?

The error alone does not tell you. Your organization's administrators and application owners with sufficient permissions can revoke credentials. Microsoft can also revoke a credential after detecting that a threat actor compromised it, for example by stealing an existing credential or adding a new one to the application or enterprise application.

Microsoft records revocations in a tokenRevocations collection on both the application object and the service principal object. Its troubleshooting article reads them with the Microsoft Graph beta endpoint. Use the application (client) ID from the error message and check both objects:

GET https://graph.microsoft.com/beta/applications(appId='<app-id>')/tokenRevocations
GET https://graph.microsoft.com/beta/servicePrincipals(appId='<app-id>')/tokenRevocations

Each entry names the affected credential in credential.id. For a federated credential error, compare it with the credential ID in the error message. An empty result from one object does not rule out an entry on the other, and an authorization error does not mean there are no revocations.

Either of these checks confirms that Microsoft revoked the credential:

  • The matching entry's auditDetails.issuedBy equals 0e0fb671-b107-448b-a273-9d0ded7627a7.
  • In the Microsoft Entra admin center audit logs, the Update application or Update service principal event that recorded the revocation was initiated by Azure Active Directory Protection Services.

Microsoft says to treat its revocation as an indication that the credential was compromised. Missing audit history alone does not prove who revoked a credential. Check the date range and the audit log retention for your license first.

Why it happens

Revocation blocks one credential from getting new tokens. It does not change the credential's expiry date. Administrators and application owners with sufficient permissions can revoke a credential. Microsoft can revoke one after detecting that a threat actor compromised it.

A revocation can sit on the application object, the service principal object, or both. Deleting an entry from one object does not delete it from the other.

Renewal path

Investigate with your security team before restoring access. Microsoft's recommended recovery is:

  1. Identify every workload that uses the revoked credential. Use Identify the active credential to match key IDs in sign-in logs.
  2. Add a replacement credential by following Add and manage application credentials. For a client secret, the steps in Entra client secret expired apply; for a certificate, see client authentication certificate expired.
  3. Update each workload to use the new credential and test a fresh token request.
  4. Leave the compromised credential revoked. Remove any credentials or access that a threat actor added.
  5. Investigate any other unauthorized changes to the application and its enterprise application.

Remove a revocation only if your investigation shows it was incorrect and the credential is safe to use. Deleting a revocation lets the credential work again. It does not rotate the credential or remove a threat actor's copy of it. Microsoft documents the steps to remove a revocation; do not use them just to clear the sign-in error.

Who should own it

The application owner coordinates the replacement credential with the team that deploys the workload. The identity and security teams decide whether the credential was compromised and whether the revocation stays.

Lead time and business-day math

There is no warning period. A revoked credential cannot get new tokens. Tokens it already obtained last up to 24 hours at most, and some Microsoft resources invalidate them sooner. Prepare instead: keep a tested procedure for adding a credential and updating every consumer, so the same steps work for a planned renewal and an unplanned revocation.

A credential that reaches its end date fails differently. See Entra client secret expired, client authentication certificate expired, and enterprise app secret expired.

If nobody can be reached to replace the credential, see Ownerless credential and Owner has left.

Monitored by AppAlert

Not monitored

AppAlert tracks when credentials expire. It does not read revocation records, so it does not detect a revoked credential and can still list one as not yet expired.