Open vnStrawHat opened 2 years ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Can you please explain what you are trying to achieve here, are you trying to get a raw stream of the data in the file?
The link you provided includes "workbook" at the end (https://my-compary.sharepoint.com/_api/v2.0/drives/b!NkttCrd_dUWKmwoOvUUtX3yAAg8MIa1LuGTztRezWUOd_lXA-m1xxxxxxxxx/items/01HEO2IVZTTVTHWBWNMFCLN5TRBWxxxxxx/workbook) can you explain why?
Does the link direct like this, return the response as detailed in the API docs (https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_get?view=odsp-graph-online)?
I could be wrong, but I think you need to read the documentation on the /content endpoint:
GET /drives/{drive-id}/items/{item-id}/content
Could this issue be re-triaged? The workbook API is a valid graph endpoint for the ability to update Excel files within SharePoint Online/OneDrive. https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0
So, this is useful when doing a bulk conversion of flat JSON data Excel in a quick and non-iterative way via Power Automate's SharePoint Rest API event. The content endpoint yields a stream object and that isn't suitable for these kinds of interactions.
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
Additional environment details
Issue description
Sending API request to get workbook of excel file in Sharepoint Online return 404 "Item not found". API:
Response:
But call API to item with ID 01HEO2IVZTTVTHWBWNMFCLN5TRBWxxxxxx still response data: API:
Response:
I try to use Graph API to call and able to get workbook data: Graph API:
Response:
Token use to call sharepoint API generated by using Sharepoint App-Only with FullControl permissions Call Graph API by using Graph Explorer with user have permission site Owner