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

Exception using Reports.GetOffice365GroupsActivityDetailWithPeriod #711

Open
idealser opened this issue Aug 17, 2023 · 1 comment
Open

Comments

@idealser
Copy link

Using Graph 5.43.0-preview. When accessing following method:

var response = await GraphBetaClient.Reports.GetOffice365GroupsActivityDetailWithPeriod("D7").GetAsync();

I am getting this exception:

Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll ("Content type application/octet-stream does not have a factory registered to be parsed")

Is there something I am doing wrong?

@andrueastman
Copy link
Member

Thanks for raising this @idealser,

It looks like the metadata suggests that a json object is to be returned while the API returns a stream. For now this can be resolved by using a different response type as below.

        var requestInformation = graphClient.Reports.GetOffice365GroupsActivityDetailWithPeriod("D7").ToGetRequestInformation();
        var streamResponse = await graphClient.RequestAdapter.SendPrimitiveAsync<Stream>(requestInformation);

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

No branches or pull requests

2 participants