Forum Discussion
Trying to access xlsm workbook, but get resource not found
Hi all,
I'm trying to learn Graph in order to execute APIs from Power Automate and pull data out of a xlsm workbook into the Microsoft Dataverse for further use in Power Apps and Power Pages. My problem is when I try to access the workbook itself, I receive resource not found errors, despite using the correct drive item id for the workbook.
I run the following API:
GET https://graph.microsoft.com/v1.0/sites/ABCDE/drives/12345/root:/SharedDocuments/file.xlsm
and get a file ID for file.xlsm of "98765".
I run the next API:
https://graph.microsoft.com/v1.0/me/drive/items/98765/workbook/
Which returns a resource not found.
I'm at a bit of a loss here. I've checked and triple checked the file ID. Can Graph not touch a xlsm file?
Thank you for any help you might be able to provide.
Sincerely,
Dave
2 Replies
- DaveC2015Copper ContributorFurther reply to myself:
I had to add the following header to the create session Prefer: respond-async.
After doing this, I have been able to run my calls without a problem. - DaveC2015Copper Contributor
Replying to myself: I was able to repurpose someone else's call for my own use, which is succesfully finding the file but timing out (it's a very large 20mb and complex formula driven workbook)
Finds the resource, but times out:
https://graph.microsoft.com/v1.0/drives/12345/items/98765/workbook/
I go to create a session, which is successful, but then the API above still times out. So now I'm trying to figure out how to prevent the time out issue. I may make a separate post on that topic.