问题
how to get worksheets of a shared workbook /workbook/worksheets. I am able to get worksheets for personal workbooks but get invalid resource for shared workbooks
回答1:
Finally got it to work!
In order to get workseets of shared workbooks in office 365 need to use the following endpoint
https://graph.microsoft.com/v1.0/drives/{remoteItem.parentReference.driveId}/items/{remoteItem.id}/workbook/worksheets
In order to get {remoteItem.parentReference.driveId} and {remoteItem.id} use following endpoint
Thanks to @Petaflop for suggesting to check all the scopes. For some reason the you can list the files using Read permisson but need Read.All for listing the worksheets.(@Petaflop would have given your answer the tick if it were not deleted :))
https://graph.microsoft.com/v1.0/me/drive/search(q='.xlsx')?select=name,id,parentReference
来源:https://stackoverflow.com/questions/44279256/unable-to-get-worksheets-for-shared-workbooks-using-microsoft-graph-api-rest-end