Skip to content

feat!: reuse user request builders for signed-in user - #1198

Open
Gavin Barron (gavinbarron) wants to merge 1 commit into
mainfrom
gavinbarron-beta-me-path-reuse
Open

Gavin Barron (gavinbarron) wants to merge 1 commit into
mainfrom
gavinbarron-beta-me-path-reuse

Conversation

@gavinbarron

@gavinbarron Gavin Barron (gavinbarron) commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Preserve GraphServiceClient.Me by returning the generated Users.Item.UserItemRequestBuilder with the Graph Core placeholder user ID; the runtime rewrites /users/TokenToReplace to /me without a user lookup.
  • Exclude /me and /me/** from generation and remove 2,095 duplicate generated files (301,812 generated lines), including the generated base-client entry point. Keep /education/me unchanged.
  • Migrate affected explicit types and request-information assertions, add focused client/pipeline coverage, and document generation, custom-client requirements, and migration.

Dependency and release coordination

Depends on microsoftgraph/msgraph-sdk-dotnet-core#1146.

Core must be merged and a supporting Microsoft.Graph.Core package released before this SDK can ship. The existing floating 4.* dependency must be pinned to the actual minimum supporting version once known; no future package version is invented in this change. Validation used the coordinated Core changes packed locally as 4.0.1, not the published package of that version.

Breaking changes

  • Explicit types under Microsoft.Graph.Beta.Me move to their equivalents under Microsoft.Graph.Beta.Users.Item.
  • BaseGraphServiceClient no longer exposes Me; the public GraphServiceClient.Me entry point remains.
  • Request-information methods expose the synthetic /users/TokenToReplace path. Custom HTTP clients need the Graph URI-replacement handler, and custom adapters bypassing that pipeline must implement equivalent remapping.

Validation

  • Beta SDK compiled for net10.0; 58 affected tests passed, including root/nested requests through the real Graph HTTP pipeline, custom base URLs/adapters, raw URLs, and existing generated-builder tests.
  • Restored the final local Core artifact using package-source mapping and an isolated NuGet cache; SHA-512 matched the source package byte-for-byte.
  • Verified required exclusions, duplicate-tree removal, preservation of /education/me, absence of old Beta.Me code references, and clean diff checks.
  • Full Kiota regeneration was not run: the exact external metadata snapshot and recorded generator are not available locally. Generated changes are the narrow removal matching the new exclusions; full regeneration against the matching snapshot remains a follow-up prerequisite.
  • Existing dependency/compiler warnings remain unchanged.
Microsoft Reviewers: Open in CodeFlow

@gavinbarron
Gavin Barron (gavinbarron) requested a review from a team as a code owner November 17, 2026 00:40
@gavinbarron Gavin Barron (gavinbarron) changed the title feat!: reuse user request builders for beta me requests feat!: reuse user request builders for signed-in user Nov 17, 2026
Exclude duplicate /me generation and preserve GraphServiceClient.Me through Users.Item builders with the Graph Core replacement token. Update affected tests and migration guidance.

BREAKING CHANGE: explicit Microsoft.Graph.Beta.Me types move to Microsoft.Graph.Beta.Users.Item; BaseGraphServiceClient no longer exposes Me. Requires Graph Core URI and batch-step remapping support.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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