Add x-correlation-id header to all IMS requests#331
Open
Conversation
Co-authored-by: ben-polinsky <78756012+ben-polinsky@users.noreply.github.com>
Co-authored-by: ben-polinsky <78756012+ben-polinsky@users.noreply.github.com>
Co-authored-by: ben-polinsky <78756012+ben-polinsky@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add x-correlation-id header to requests to IMS
Add x-correlation-id header to all IMS requests
Jan 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements support for the x-correlation-id header across all auth client packages to enable request tracking through the IMS/Ping stack. Each request to IMS will include a randomly generated UUID in this header.
Changes:
- Added
x-correlation-idheader with random UUIDs to all HTTP requests to IMS endpoints - Created
CorrelationIdRequestorwrapper class for Node.js-based packages to intercept and enhance requests - Configured browser package to use native crypto API for UUID generation via
extraHeaders
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/service/src/ServiceAuthorizationClient.ts | Added correlation ID header to token endpoint requests |
| packages/service/src/OIDCDiscoveryClient.ts | Added correlation ID header to OIDC discovery requests |
| packages/node-cli/src/CorrelationIdRequestor.ts | Created requestor wrapper to inject correlation ID into all requests |
| packages/node-cli/src/Client.ts | Replaced NodeRequestor with CorrelationIdRequestor |
| packages/electron/src/main/CorrelationIdRequestor.ts | Created requestor wrapper (duplicate of node-cli version) |
| packages/electron/src/main/Client.ts | Replaced NodeRequestor with CorrelationIdRequestor |
| packages/browser/src/Client.ts | Added extraHeaders configuration with correlation ID function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ing comment Co-authored-by: ben-polinsky <78756012+ben-polinsky@users.noreply.github.com>
ben-polinsky
requested changes
Jan 20, 2026
Collaborator
ben-polinsky
left a comment
There was a problem hiding this comment.
You need to run rush change
Author
Ran |
ben-polinsky
requested changes
Jan 20, 2026
Collaborator
ben-polinsky
left a comment
There was a problem hiding this comment.
see latest comments
ben-polinsky
requested changes
Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation Complete: Add x-correlation-id header to IMS requests
Summary
All auth-clients packages now automatically include the x-correlation-id header with a random UUID in all requests to IMS. This enables better request tracking through the IMS/PING system as requested. Beachball change files have been generated for all affected packages.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.