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?