microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
After upgrade to Graph .NET SDK 5 with the removal of "Request()", the usageRights object is no longer available from the users[id] API
@andrueastman is already working on this.
Since Mar 7, 2024.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
Describe the Problem
In a ASP.NET 6 Core app, I was/am using the Graph Beta endpoint where the usageRights API is (only) available (it's been in beta for a long time).
Before the upgrade to Graph SDK 5 this code worked:
var usageRights = await _graphServiceClient.Users[user.Id].UsageRights
.Request()
.Filter(<my filter>)
.GetAsync();
After upgrade to Graph SDK 5, and the removal of the Request() from the fluent API, this code does not compile:
var usageRights = await _graphServiceClient.Users[user.Id].UsageRights
.Filter(<my filter>)
.GetAsync();
Error CS1061'UserItemRequestBuilder' does not contain a definition for 'UsageRights' and no accessible extension method 'UsageRights' accepting a first argument of type 'UserItemRequestBuilder' could be found (are you missing a using directive or an assembly reference?)
To Reproduce
- Install nuget
Microsoft.Identity.Web.GraphServiceClientBeta - remove "Request()" from the Fluent API code
- get compiler error
Expected behavior
I expect the usageRights object/API to be available like before.
Screenshots
Desktop (please complete the following information):
- OS: Windows
- Visual Studio 2022
Additional context
I am trying to upgrade to keep current and also use the new Retry interface but seem to be blocked now. I guess I could use the REST endpoint directly but I want to keep using the SDK for code consistency.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.