Graph API convert to other formats xlsx reporting "Incorrect format specified"
Steven Fayers
1
Reputation point
Using graph API, I have a CSV file stored on SharePoint, and I'm trying to convert the content to xlsx following this page:
https://learn.microsoft.com/en-us/graph/api/driveitem-get-content-format?view=graph-rest-1.0&tabs=http
using
GET https://graph.microsoft.com/v1.0/drives/(driveid)/items/(itemid)/content
I get the content returned, but using
GET https://graph.microsoft.com/v1.0/drives/(driveid)/items/(itemid)/content?format=xlsx
I get an error:
"code": "invalidRequest",
"message": "Incorrect format specified"
I tried PDF as well:
GET https://graph.microsoft.com/v1.0/drives/(driveid)/items/(itemid)/content?format=pdf
I get a different type of error,
"code": "notSupported",
"message": "csv",
"innererror": {
"code": "InputFormatNotSupported"
Can anybody advise me if the graph API can convert CSV to XLSX, and if so, what is wrong with my request?
Microsoft Security | Microsoft Graph
13,724 questions
Sign in to answer