0
votes

I've been calling this endpoint for the last month or so by converting my word document into a pdf and its been working fine:

https://graph.microsoft.com/v1.0/drives/{drive_id}/root/children('example.docx')/content?format=pdf

I tried this today and it seem that i don't get the pdf as a response but rather:

{
    "error": {
        "code": "generalException",
        "message": "Error from Office Service. Url=https://wordcs.officeapps.live.com/document/export/pdf HttpCode=NotFound cert=subject:;thumbprint: ResponseHeaders=Connection: close\r\nDate: Wed, 27 Jan 2021 14:14:23 GMT\r\nServer: Microsoft-IIS/10.0\r\nX-Powered-By: ASP.NET\r\n",
        "innererror": {
            "code": "OfficeConversion_ConverterInternal"
        }
    }
}

I followed these docs from Microsoft but with no help :/

https://docs.microsoft.com/en-us/graph/api/driveitem-get-content-format?view=graph-rest-1.0&tabs=http

When i don't use the format parameter to fetch the pdf conversion i can successfully get a response (200) from the original file atleast:

https://graph.microsoft.com/v1.0/drives/{drive_id}/root/children('example.docx')/content

Have the Microsoft Graph API been updated recently?

Also i do have all Azure access and all of that since this has been working fine for the past month so I'm almost certain the API has changed or perhaps my domain got blocked or something...

1
I saw i don't have the exact same url as the docs but even if i tried the same url , this did not work either graph.microsoft.com/v1.0/drive/root/…Robin Larsson
Interesting. Outside of your application, can you repro the issue with Graph explorer or POSTMAN as well?Dev
Yes I've tested both from code and from postman. Cannot seem to find the issue. I tried both with content type application/pdf head and without it and still the same response. See screenshot here: gyazo.com/3ef434584b830dcd84ce43046f145adcRobin Larsson
And for clarification I see 404 response but the file is there since if i remove the format parameter i get the actual file but as a .docx @DevRobin Larsson

1 Answers

1
votes

please check now. The issue has been resolved.