Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@ You can view the [README](https://github.com/microsoft/kiota/blob/main/README.md

For the purposes of the .Net client library, the generator runs through an openApi file generated from the CSDL document file published by Microsoft Graph (https://graph.microsoft.com/v1.0/$metadata) and builds up an in-memory list of models.

The generation configuration in `src/Microsoft.Graph/Generated/kiota-lock.json`
excludes `/me` and `/me/**`. Keep these exclusions when regenerating: the
handwritten `GraphServiceClient.Me` property reuses the `/users/{user-id}`
request builders with `CoreConstants.ReplacementConstants.UserIdTokenToReplace`.
Request information therefore contains `/users/TokenToReplace`; Microsoft.Graph.Core
rewrites that path to `/me` before sending, including requests in a batch.
No user lookup is performed.

See the [signed-in user migration notes](README.md#signed-in-user-request-builders)
for the breaking namespace changes and custom HTTP pipeline requirements.

This SDK change must ship with the Microsoft.Graph.Core implementation of that
replacement constant and URI replacement handler; the existing `4.*` dependency
does not establish a minimum release containing it. Once that core release is
published, set the package dependency to its actual minimum supported version.

### When new features are added to the library
Generation happens as part of a manual process that occurs once a significant change or set of changes has been added to the Graph. This may include:
- A new workload comes to v1.0 of Graph (Microsoft Teams, Batching, etc.)
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,26 @@ Between 4.x and 5.x there were several major breaking changes as the SDK now use

View the upgrade guide [here](https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/main/docs/upgrade-to-v5.md).

### Signed-in user request builders

`graphClient.Me` reuses the `Microsoft.Graph.Users.Item` request builders.
Requests still reach `/me`; no user ID lookup is required. Request information
contains the intermediate `/users/TokenToReplace` path until the core HTTP
pipeline (or batch handling) rewrites it.

**Breaking change:** replace explicit `Microsoft.Graph.Me.*` references with
their `Microsoft.Graph.Users.Item.*` equivalents, including action request
bodies, responses, and query parameter types. Access `Me` through
`GraphServiceClient`, not `BaseGraphServiceClient`.

If you supply an `HttpClient`, create it with `GraphClientFactory.Create()` or
include `UriReplacementHandler<GraphUriReplacementHandlerOption>` configured
with `new GraphUriReplacementHandlerOption()` in your custom pipeline. The handler
is in `Microsoft.Kiota.Http.HttpClientLibrary.Middleware`; its option is in
`Microsoft.Graph`. Custom request adapters must implement equivalent path
replacement. The SDK preserves supplied clients and adapters rather than
replacing their pipelines.

## Issues

To view or log issues, see [issues](https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues).
Expand Down
6 changes: 0 additions & 6 deletions src/Microsoft.Graph/Generated/BaseGraphServiceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
using Microsoft.Graph.IdentityProviders;
using Microsoft.Graph.InformationProtection;
using Microsoft.Graph.Invitations;
using Microsoft.Graph.Me;
using Microsoft.Graph.Oauth2PermissionGrants;
using Microsoft.Graph.Organization;
using Microsoft.Graph.PermissionGrants;
Expand Down Expand Up @@ -306,11 +305,6 @@ public partial class BaseGraphServiceClient : BaseRequestBuilder
{
get => new global::Microsoft.Graph.Invitations.InvitationsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the user singleton.</summary>
public global::Microsoft.Graph.Me.MeRequestBuilder Me
{
get => new global::Microsoft.Graph.Me.MeRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the collection of oAuth2PermissionGrant entities.</summary>
Comment thread
gavinbarron marked this conversation as resolved.
Resolved
public global::Microsoft.Graph.Oauth2PermissionGrants.Oauth2PermissionGrantsRequestBuilder Oauth2PermissionGrants
{
Expand Down

This file was deleted.

Loading
Loading