Hello Gal Ofer,
The correct format is indeed ../content?format=pdf
. It seems there might be an issue with the Graph Explorer. However, if you try using a tool like Postman, it should work there.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Using graph-explorer in my tenant (as general admin) I made sure there is consent for Files.ReadWrite.All
and ran:
I get error 406
when using /content?format=pdf I get Bad Request - 400
Same call in C# using Microsoft.Graph" Version="5.50.0"
var stream = await _graphClient.Drives[driveItem.ParentReference.DriveId].Items[driveItem.Id].Content.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Format = "{'pdf'}";
});
Shows error : System.InvalidOperationException: Content type application/octet-stream does not have a factory registered to be parsed
What Am I missing? is this because my environment is for developers?
Thanks
Hello Gal Ofer,
The correct format is indeed ../content?format=pdf
. It seems there might be an issue with the Graph Explorer. However, if you try using a tool like Postman, it should work there.