Skip to content

entra-live-check: support a confidential-client app registration - #8

Merged
MattJackson merged 1 commit into
mainfrom
fix/entra-live-check-confidential-client
Aug 12, 2026
Merged

entra-live-check: support a confidential-client app registration#8
MattJackson merged 1 commit into
mainfrom
fix/entra-live-check-confidential-client

Conversation

@MattJackson

Copy link
Copy Markdown
Contributor

entra-live-check has been red on main since 2026-08-04 — nine consecutive runs. Not a flake, not a code regression: the tenant's app registration stopped being treated as a public client, so the password grant is refused.

thread 'main' panicked at auth-oidc/examples/entra_live_check.rs:60:5:
Entra rejected the real password grant (401 Unauthorized): {"error":"invalid_client",
"error_codes":[7000218],"error_description":"AADSTS7000218: The request body must contain
the following parameter: 'client_assertion' or 'client_secret'. ..."}

A public client sends no secret; a confidential one must. Which one an app registration is comes down to its Allow public client flows setting, and Entra reports the mismatch as AADSTS7000218 without ever naming that setting — so the failure gave no route to a fix.

This sends client_secret when an ENTRA_CLIENT_SECRET is provisioned and omits it when it is not, covering both shapes, and the assertion message now names AADSTS7000218 and both remedies.

This does not turn the check green on its own

It only makes the fix possible without another code change. One of these still has to happen tenant-side:

  • re-enable Allow public client flows on the app registration, or
  • provision an ENTRA_CLIENT_SECRET repo secret.

Until then the check stays red — and it should. It is reporting a genuine loss of live-IdP coverage, not noise. Do not merge this expecting green; merge it once one of the two above is done, so the very next push to main proves it.

The workflow only fires on push to main, so this PR's own CI cannot exercise it.

`entra-live-check` has been RED on main since 2026-08-04 — nine consecutive runs.
It is not a flake and not a code regression; the tenant's app registration stopped
being treated as a public client, so the password grant is refused:

  thread 'main' panicked at auth-oidc/examples/entra_live_check.rs:60:5:
  Entra rejected the real password grant (401 Unauthorized): {"error":"invalid_client",
  "error_codes":[7000218],"error_description":"AADSTS7000218: The request body must
  contain the following parameter: 'client_assertion' or 'client_secret'. ..."}

A public client sends no secret; a confidential one must. Which of the two an app
registration is comes down to its "Allow public client flows" setting, and Entra
reports the mismatch as AADSTS7000218 without ever naming that setting — so the
failure gave no route to a fix. The example now sends `client_secret` when an
`ENTRA_CLIENT_SECRET` is provisioned and omits it when it is not, covering both
shapes, and the assertion message names AADSTS7000218 and both remedies.

THIS ALONE DOES NOT TURN THE CHECK GREEN. It only makes the fix possible without
another code change. One of these must still happen on the tenant side:
  - re-enable "Allow public client flows" on the app registration, or
  - provision an ENTRA_CLIENT_SECRET repo secret.
Until then the check stays red, and it should stay red — it is reporting a real
loss of live-IdP coverage, not noise.
@MattJackson
MattJackson merged commit ab71022 into main Aug 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant