Graph api to convert Docx to Pdf is not working

Ranga Raj 0 Reputation points

I am using Microsoft Graph api to convert docx file to pdf. One specific docx file (size - 232 KB, 204 pages) can't convert to pdf by using the grapgh api. I tried the same using onedrive( onedrive-->copy file as pdf using flows) and failed to convert. I could convert even 4 MB file,but can't convert the specific 232 KB file. I got the following response from (onedrive-->copy file as pdf using flows):

  "error": {
    "code": 502,
    "source": "",
    "clientRequestId": "956004f2-0a06-4e76-ae71-3676a5d0353b",
    "message": "BadGateway",
    "innerError": {
      "status": 502,
      "message": "The operation has timed out.",
      "source": ""
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,858 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Shivam Dhiman 5,946 Reputation points

    Hi @Ranga Raj

    As per the error messages it looks like your request is getting time out in between flow and Graph. So, I will suggest you increase your flow time out. Also, to confirm whether the issue is with flow or Graph API you can use Postman to check whether Graph API is getting time out or not.
    Please refer to this documentation to configure your postman with Graph
    to generate token, refer to this documentation and check if you are facing same issue.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

  2. Zehui Yao_MSFT 5,831 Reputation points

    Hi Ranga Raj ,if you're in a very urgent situation right now, I recommend the option to raise a support case with Microsoft Graph, a backend Support Engineer will be able to assist you better. Hope this Helps. Best wishes. You can raise support ticket from or

    0 comments No comments