Skip to content

Fix client ID returned by token introspection - #5787

Open
Jared Erwin (feordin) wants to merge 3 commits into
mainfrom
users/jaerwin/introspection-client-id
Open

Fix client ID returned by token introspection#5787
Jared Erwin (feordin) wants to merge 3 commits into
mainfrom
users/jaerwin/introspection-client-id

Conversation

@feordin

@feordin Jared Erwin (feordin) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

  • Return the Entra v1 appid or Entra v2 azp claim as the RFC 7662 client_id instead of the user subject.
  • Preserve explicit client_id precedence and the sub fallback used by development OpenIddict tokens.
  • Add direct service regression tests and exact client ID assertions to the E2E coverage.

Related issues

Addresses [issue AB#206560].

Testing

Additional integration tests were added

FHIR Team Checklist

  • CI is green before merge

Semver Change (docs)

Patch - corrects the client identifier returned by token introspection without changing the endpoint contract.

Return Entra appid and azp claims as the RFC 7662 client_id before falling back to the subject used by development OpenIddict tokens. Add direct mapping tests and exact E2E assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5c093da7-5c6e-47c4-bea5-24f9667bbf49
@feordin
Jared Erwin (feordin) requested a review from a team as a code owner September 2, 2026 16:31
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.03%. Comparing base (20d379f) to head (d962f97).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5787      +/-   ##
==========================================
+ Coverage   78.28%   79.03%   +0.74%     
==========================================
  Files        1016     1016              
  Lines       36940    36943       +3     
  Branches     5619     5620       +1     
==========================================
+ Hits        28920    29199     +279     
+ Misses       6644     6350     -294     
- Partials     1376     1394      +18     

see 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@feordin Jared Erwin (feordin) added Bug Bug bug bug. Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Schema Version unchanged No-PaaS-breaking-change No-ADR ADR not needed labels Sep 2, 2026
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Bug Bug bug bug. No-ADR ADR not needed No-PaaS-breaking-change Schema Version unchanged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants