Hi @Jalen Parham
The same API call works fine for me. Have you tested it in Postman?
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to use the Graph API to create a new Excel workbook. I keep finding this way to do it everywhere on the internet. But I keep getting this error.
POST https://graph.microsoft.com/v1.0/me/drive/root/children
{
"file": {},
"name": "test.xlsx",
"@microsoft.graph.conflictBehavior": "rename",
}
But I keep getting this error.
{
code: 'invalidRequest',
message: 'Cannot create a file without content',
innerError: {
date: '2024-05-13T18:21:41',
'request-id': 'f0c4bd63-3242-4988-8fe5-79ab181f7046',
'client-request-id': 'f0c4bd63-3242-4988-8fe5-79ab181f7046'
}
}
How is the API call supposed to work?
Hi @Jalen Parham
The same API call works fine for me. Have you tested it in Postman?
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.
Hello @Jalen Parham ,
Using Graph Explorer, I am able to use the same Graph API call. I have noticed in the request body you have provided there is a comma (,) in the third line after the rename. Please remove that and run the query.
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".