Skip to content

Conversation

@skg-marimuthu
Copy link
Contributor

Adding ClientRequestId as CorrelationId for Graph API calls

Copilot AI review requested due to automatic review settings January 27, 2026 02:44
@skg-marimuthu skg-marimuthu requested review from a team as code owners January 27, 2026 02:44
@skg-marimuthu skg-marimuthu enabled auto-merge (squash) January 27, 2026 02:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for the client-request-id header in HTTP requests to Microsoft Graph API to improve request tracing and correlation. The header uses the same value as the existing x-ms-correlation-id header to enable consistent tracking across API calls.

Changes:

  • Added ClientRequestIdHeaderName constant to HttpClientFactory
  • Modified CreateAuthenticatedClient to set the client-request-id header with the correlation ID value
  • Added three comprehensive tests to verify the new header is set correctly in various scenarios

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Microsoft.Agents.A365.DevTools.Cli/Services/Internal/HttpClientFactory.cs Added constant for client-request-id header and logic to set it with the correlation ID value
src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Services/Internal/HttpClientFactoryTests.cs Added tests verifying client-request-id header is set, matches correlation ID, and works with both auto-generated and provided correlation IDs

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.

3 participants