Graph api to convert Docx to Pdf is not working

Ranga Raj 0 Reputation points
2023-04-14T07:42:25.9033333+00:00

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": "flow-apim-msmanaged-na-northcentralus-01.azure-apim.net",
    "clientRequestId": "956004f2-0a06-4e76-ae71-3676a5d0353b",
    "message": "BadGateway",
    "innerError": {
      "status": 502,
      "message": "The operation has timed out.",
      "source": "api.connectorp.svc.ms"
    }
  }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,445 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Shivam Dhiman 5,951 Reputation points
    2023-04-14T11:15:39.9033333+00:00

    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
    or
    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,846 Reputation points
    2023-04-17T07:21:39.1266667+00:00

    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 http://aad.portal.azure.com/ or https://admin.microsoft.com/#/support/requests.

    0 comments No comments