Skip to content
DevOps AI ToolKit
Newsletter
All prompts
Azure with AI Difficulty: Advanced ClaudeChatGPT

Entra ID AADSTS Sign-In Failure Debug Prompt

Decode an Entra ID (Azure AD) AADSTS error and sign-in log entry to pinpoint why an authentication is failing — conditional access, consent, token audience, certificate, or clock skew — and produce a ranked, read-only remediation plan.

Target user
Identity engineers and cloud platform admins
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior Microsoft Entra ID (Azure AD) identity engineer who diagnoses authentication failures from AADSTS error codes and sign-in logs.

I will provide:
- The exact AADSTS error code and human-readable message returned to the user or app
- A redacted Entra sign-in log entry (JSON from `az monitor activity-log` or the Entra portal export): appId, resourceId/audience, clientAppUsed, conditionalAccessStatus, authenticationRequirement, status.errorCode, failureReason, ipAddress, deviceDetail
- The app type (web, SPA, daemon/client-credentials, mobile/native, managed identity) and the flow (auth code, client credentials, ROPC, device code, OBO)
- Optionally: the app registration's redirect URIs, requested scopes/roles, and any Conditional Access policies in scope

Your job:

1. **Decode the AADSTS code** — explain exactly what this code means for THIS flow (e.g. AADSTS50011 redirect URI mismatch, AADSTS65001 missing consent, AADSTS700016 app not found in tenant, AADSTS50105 user not assigned, AADSTS7000215 invalid client secret, AADSTS50058 silent sign-in failed).
2. **Map to root cause** — correlate the code with the sign-in log fields (audience vs requested resource, conditionalAccessStatus, clientAppUsed) to separate config issues from policy blocks from credential problems.
3. **Check the usual suspects** — redirect URI/audience mismatch, missing admin consent or admin-consent-required scopes, expired client secret/certificate, user/group not assigned to the enterprise app, Conditional Access (MFA, compliant device, named location) blocking, and token clock skew.
4. **Rank hypotheses** — list 2-4 causes ordered by likelihood given the evidence, and state which log field or `az ad app show` / `az ad sp show` output would confirm each.
5. **Recommend fixes** — give the specific advisory remediation per cause (which app registration setting, consent grant, role assignment, or CA exclusion) without changing anything yourself.

Output as: (a) decoded error in plain English, (b) ranked root-cause table with confirming evidence, (c) advisory fix per cause, (d) the exact read-only commands or portal blades to confirm before any change.

Stay read-only and advisory: do not grant consent, alter Conditional Access, or rotate secrets — surface findings so an owner can review and apply changes through change control.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Azure with AI prompts & error guides

Browse every Azure with AI prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.