AADSTS7000218

Request must contain client_assertion or client_secret

Last reviewed 2026-07-18 by the Just Software engineering team · also seen as 7000218, request body must contain client_assertion or client_secret

What it means

AADSTS7000218 — "The request body must contain the following parameter: 'client_assertion' or 'client_secret'." The token endpoint expected the app to authenticate itself (as a confidential client) but the request carried no secret or assertion. This typically hits public-client flows — device code, ROPC, native-app refresh — when the app registration is not flagged to allow public client flows.

Common causes

  1. The app registration's 'Allow public client flows' setting is No while the app uses device code flow, ROPC or other public-client grants.

  2. A confidential-client flow genuinely missing the secret/assertion in the POST body (wrong parameter name, empty config value).

  3. The wrong app registration is used — a web-app registration for what is actually a native/CLI client.

How to fix it

  1. For public clients: Entra admin center > App registrations > (app) > Authentication > Advanced settings > Allow public client flows > Yes.

  2. For confidential clients: include client_secret (URL-encoded) or a client_assertion JWT in the token request body — not in the query string.

  3. Review the registration type: interactive CLIs and desktop apps should use a public client registration with the appropriate redirect URIs, not a web platform config with secrets baked in.

An unhandled error has occurred. Reload 🗙