Graph API export Sharepoint document as PDF throws 406 error UnsupportedMediaType

tmsvl 50 Reputation points
2025-08-04T08:19:59.6666667+00:00

We are using the Microsoft APIs to download files from Sharepoint while immediately converting them to PDF on the fly.

End of July, this was still working fine; this weekend we run the same logic again and it fails consistently with this error:

[406] Error from Office Service. Url=https://euc.wordcs.officeapps.live.com/document/export/pdf HttpCode=UnsupportedMediaType

The error code is "OfficeConversion_DocumentProtected" but there's - as far as I know - no special protection enabled on the document...

When not exporting to PDF, it works fine to download the file. Any clues?

Microsoft Security | Microsoft Graph
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.