Unable to get worksheets for shared workbooks using Microsoft Graph API REST endpoint

。_饼干妹妹 提交于 2020-06-27 19:06:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!