Hi Nina, Good afternoon and I hope you are doing well! Thank you for your question. I tested GET https://graph.microsoft.com/v.1/me/drive/items/{item-id}/content and I was able to get response. On Graph Explorer, I received an error due to CORS policy although I was able to run this on Postman. On Postman:
- if the file is PDF I was able to view it graphically.
- if the file is other than pdf, I was able to view it either binary or unreadable characters. Using the steps provide in the article Download a file in another format, I was able to view a docx file on PDF format. There are certain notes when using it according to the ar:
- This endpoint requires TLS 1.2 to function normally.
- Not all files can be converted into all formats.
- Here are the only supported source extensions: csv, doc, docx, odp, ods, odt, pot, potm, potx, pps, ppsx, ppsxm, ppt, pptm, pptx, rtf, xls, xlsx .
<p>For download files in JavaScript apps, please refer to Downloading files in JavaScript App under the Download the contents of a DriveItem.</p>
<p> Since we are limited on source and destination file type, I would suggest providing a feedback at https://feedbackportal.microsoft.com/feedback/forum/ebe2edae-97d1-ec11-a7b5-0022481f3c80 so that our team can look into it and add the feature</p>
Reference: Download the contents of a DriveItem https://learn.microsoft.com/en-us/graph/api/driveitem-get-content-format?view=graph-rest-1.0&tabs=http
Download a file in another format https://learn.microsoft.com/en-us/graph/api/driveitem-get-content-format?view=graph-rest-1.0&tabs=http