Microsoft Entra Workload ID
Troubleshooting

Troubleshoot revoked application credentials

In brief

A new guide explains revoked-credential error codes, how to inspect tokenRevocations on applications and service principals using Microsoft Graph beta, and how to assess revocation effects and possible compromise.

What Entra admins need to know

Administrators can use the documented checks to diagnose token acquisition failures and determine whether revoked credentials may still allow access to some resources until existing tokens expire.

This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

new file mode 100644

title: Troubleshoot revoked application credentials description: Resolve revoked credential errors, inspect tokenRevocations, and determine whether Microsoft revoked an application credential. ms.topic: troubleshooting ms.date: 10/22/2026 ai-usage: ai-generated # Customer intent: As an application owner or tenant administrator, I want to understand why an application credential was revoked and restore access safely.

Troubleshoot revoked application credentials

If an application can't acquire a token because its credential was revoked, the Microsoft Entra security token service (STS) can return one of these errors.

Error codeError nameError message
AADSTS700027InvalidClientAssertionRevokedKeysProvidedThe provided client assertion for {X} is using a key which is revoked. Please specify a valid client assertion.
AADSTS7005003InvalidClientSecretRevokedKeysProvidedThe provided client secret keys for app '{X}' are revoked. Please specify a valid client secret.
AADSTS7005004InvalidClientAssertionRevokedKeysProvidedThe provided client assertion for {X} is using a key which is revoked. Please specify a valid client assertion.
AADSTS7005005FederatedIdentityCredentialRevokedThe provided federated credential with id: '{Y}' for application '{X}' is revoked.
AADSTS7005006TokenRevocationBlocksIssuance{X} has blocked token issuance for this request.

In these messages, {X} is the application's application (client) ID, and {Y} is the federated identity credential ID. Match the message as well as the code: AADSTS700027 can also indicate other client assertion validation failures.

Understand why a credential was revoked

Microsoft can revoke a credential in your tenant after detecting that a threat actor compromised it. The threat actor might have stolen an existing credential or added a credential to an application or service principal to gain access.

The tokenRevocations property records revocations on an application or service principal. Revoking a credential has the following effects:

  • The revoked credential can no longer be used as a client credential to acquire new tokens.
  • For some Microsoft resources, tokens already issued using the credential are invalidated before they expire.
  • For other resources, tokens already issued using the credential continue to work until they expire, which can take up to 24 hours. The revoked credential can't acquire a replacement token.

Don't assume revocation immediately ends access to every resource. Investigate the compromise and the resources the application could access.

Check both the application and service principal

Use Microsoft Graph to read tokenRevocations for both object types in the affected tenant. Your tenant might contain only the application object, only the service principal object, or both for the same application ID. A revocation can be recorded on either object. For background, see Application and service principal objects.

Use an account authorized to read the affected objects. The following requests use the Microsoft Graph /beta endpoint.

  1. Record the application (client) ID from the error and confirm which tenant the failed token request targeted.

  2. Replace {appId} with that application (client) ID, not an object ID. Query the application object's revocations:

    GET https://graph.microsoft.com/beta/applications(appId='{appId}')/tokenRevocations
    
  3. Query the service principal object's revocations with the same application ID:

    GET https://graph.microsoft.com/beta/servicePrincipals(appId='{appId}')/tokenRevocations
    
  4. Inspect both responses. Keep track of which object contains each revocation, even if you find a match in the first response.

Interpret the response

A successful response contains a value array. A nonempty array means that the object has revocation entries. For example, this illustrative response shows a revoked client secret. Unrelated fields are omitted.

{
  "value": [
    {
      "@odata.type": "#microsoft.graph.passwordCredentialRevocation",
      "id": "11111111-2222-3333-4444-555555555555",
      "auditDetails": {
        "reason": "Compromised credential",
        "fromDateTime": "2026-10-22T12:00:00Z",
        "issuedBy": "0e0fb671-b107-448b-a273-9d0ded7627a7"
      },
      "credential": {
        "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
      }
    }
  ]
}

Inspect these fields for the revocation that affects your credential:

FieldWhat to look for
idThe revocation ID. Save this value if you need to delete the revocation. It isn't the application ID or credential ID.
credential.idThe affected credential's ID. For a federated identity credential error, compare it with {Y} in the error message.
auditDetails.issuedByThe issuer's identifier. Use the check in the next section to determine whether Microsoft issued the revocation.
auditDetails.reasonOptional free-text context about the revocation. The text can vary and isn't proof of who issued it.
auditDetails.fromDateTimeThe timestamp recorded in the revocation's audit details. Use it to help locate the corresponding audit event.

Handle other responses as follows:

  • An empty "value": [] means that no revocations were returned for that object. Still check the other object type.
  • An object-not-found response can mean that the object type doesn't exist in your tenant. Confirm the tenant and application ID, and check the other object type.
  • An authorization error doesn't mean that no revocations exist. Resolve the access or consent issue before drawing a conclusion.
  • If the response includes @odata.nextLink, follow it to inspect the remaining entries.

If neither object has a matching revocation, confirm the application ID, tenant, and credential used by the failing request. Don't attribute the failure to Microsoft without the evidence described next.

Determine whether Microsoft revoked the credential

Either of the following checks confirms a Microsoft-initiated revocation. You don't need both to match.

Check the revocation issuer

Inspect auditDetails.issuedBy on the matching revocation. If it equals the following value, Microsoft revoked the credential:

0e0fb671-b107-448b-a273-9d0ded7627a7

The example response in the previous section contains this value. You can also use the audit logs to investigate the actor.

Check tenant audit logs

Look for the update that recorded the revocation on the affected object:

  1. Sign in to the Microsoft Entra admin center in the affected tenant as at least a Reports Reader.
  2. Browse to Entra ID > Monitoring & health > Audit logs.
  3. Set the date range to include the revocation. Look for an Update application or Update service principal activity for the affected object.
  4. Open the event and review its target, changed properties, and initiator. A corresponding revocation update initiated by Azure Active Directory Protection Services means that Microsoft revoked the credential.

Check that the event relates to the affected object and revocation, rather than an unrelated update. If you can't find the event, check the time range and your tenant's audit log retention. Missing audit history alone doesn't establish who revoked the credential.

Restore application access

Investigate the credential and any unauthorized changes with your security team before restoring access. If Microsoft revoked it, treat the revocation as an indication that the credential was compromised.

The recommended recovery is to replace the compromised credential and update the workload to use the replacement. Leave the compromised credential revoked, and remove credentials or access that a threat actor added. For application credential setup, see Add and manage application credentials.

Remove a revocation

If your investigation determines that the revocation was incorrect and the credential is safe to use, you can remove the revocation. You need permission to manage revocations on the affected object.

  1. Save the revocation details for your investigation. Identify the object that contains the entry and the entry's top-level id.

  2. Replace {appId} with the application (client) ID and {revocationId} with that revocation ID. Use the request for the object that contains the entry.

    For a revocation on the application object:

    DELETE https://graph.microsoft.com/beta/applications(appId='{appId}')/tokenRevocations/{revocationId}
    

    For a revocation on the service principal object:

    DELETE https://graph.microsoft.com/beta/servicePrincipals(appId='{appId}')/tokenRevocations/{revocationId}
    

    These requests don't require a request body. Delete only the entry you intend to remove; don't clear unrelated revocations.

  3. Repeat the earlier GET requests to confirm that the selected entry is gone and check for any remaining revocations affecting the credential. Deleting an entry from one object doesn't delete entries from the other.

  4. Retry token acquisition with the intended credential. If it still fails, review the new error and any remaining revocations.

Related content

Daily Entra.News

Get daily email updates

Get a concise summary of the latest Microsoft Entra updates delivered straight to your inbox.

Loading the secure signup form…