Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reports.GetSharePointSiteUsageDetailWithDate throws ArgumentException #2193

Closed
netclectic opened this issue Nov 1, 2023 · 2 comments · Fixed by microsoft/kiota-dotnet#143
Assignees
Labels

Comments

@netclectic
Copy link

Describe the bug
Calling Reports.GetSharePointSiteUsageDetailWithDate results in an ArgumentException with the message: Illegal class passed as substitution, found Microsoft.Kiota.Abstractions.Date at col:58

To Reproduce
Steps to reproduce the behavior:

DateTime dateTime = DateTime.UtcNow;
var date = new Microsoft.Kiota.Abstractions.Date(dateTime.Date);
var report = await Client.Reports.GetSharePointSiteUsageDetailWithDate(date).GetAsync();

The exception actually occurs when trying to get the Uri from the request...

DateTime dateTime = DateTime.UtcNow;
var date = new Microsoft.Kiota.Abstractions.Date(dateTime.Date);
var request = Client.Reports
    .GetSharePointSiteUsageDetailWithDate(date)
    .ToGetRequestInformation();
var uri = request.URI;

Expected behavior
It should execute the request and return a stream containing the report data.

Screenshots
n/a

Desktop (please complete the following information):

  • OS: Windows 11

Additional context
using NuGet package: Microsoft.Graph, Version=5.32.0

@andrueastman
Copy link
Member

Thanks for raising this @netclectic

Any chance you can confirm the issue is resolved now if you add the package reference to the latest abstraction package to your project?
https://www.nuget.org/packages/Microsoft.Kiota.Abstractions/1.6.1

Please re-open in the event of any issues.

@netclectic
Copy link
Author

I can confirm that it is working now with v1.6.1

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants