Revert: Fix get_caller_pairs userId fallback#141
Merged
Conversation
…rosoft#118)" This reverts commit 97ec7f3.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Reverts PR #118, restoring the original behavior where userId is set strictly from aad_object_id to satisfy the ingest service's GUID-only requirement.
Changes:
- Revert
get_caller_pairsto yield onlyfrm.aad_object_idforUSER_ID_KEY. - Remove the four tests that validated the fallback chain behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/microsoft/opentelemetry/a365/hosting/scope_helpers/utils.py | Reverts the aad_object_id → agentic_user_id → frm.id fallback to use only aad_object_id. |
| tests/a365/hosting/scope_helpers/test_scope_helper_utils.py | Removes tests that asserted the fallback behavior being reverted. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
@fpfp100 Please fix the lint errors and I can re-approve after that. |
JacksonWeber
approved these changes
May 14, 2026
requests 2.34.1 changed HeadersType from Mapping to MutableMapping, which is invariant in its value type. Widen headers annotation from dict[str, str] to dict[str, str | bytes] to match. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nikhilNava
approved these changes
May 14, 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.
Summary
Reverts #118.
The ingest service only accepts GUIDs for
user.id. Any non-GUID value gets replaced with an all-zeros GUID (00000000-0000-0000-0000-000000000000). Allowing non-GUID values as userId (via theaad_object_id → agentic_user_id → frm.idfallback chain) breaks downstream scenarios that expect an AAD object ID.Test plan
🤖 Generated with Claude Code
Note
The original PR will not take effect since UPN (non-GUID) values are always ignored by the ingestion service.