question

chenliao-5449 avatar image
0 Votes"
chenliao-5449 asked chenliao-5449 commented

Error Item not found in get WorkSheets

when I using "GET /me/drive/items/{id}/workbook/worksheets" throws error; I get the following error :

129019-qq%E5%9B%BE%E7%89%8720210903154134.png



I want to ask a Answer,thank you

microsoft-graph-workbooks
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is this your complete call in the code? GET https://graph.microsoft.com/v1.0/me/drive/items/{item id}/workbook/worksheets.

0 Votes 0 ·

Can you try to call the api in Graph Explorer and tell me the result?

129438-image.png


0 Votes 0 ·
image.png (83.8 KiB)

Would you please provide us with an update on the status of your issue?

0 Votes 0 ·

iThis issue has not been solved.
II'm use Java code call API get WorkSheets is fail
Error message : Item not found

http request code :
https://microsoftgraph.chinacloudapi.cn/v1.0/users/{user_id}/drive/items/{items_id}/workbook/worksheets

Java code:
WorkbookWorksheetCollectionpage workbookWorksheetpage = graphClient.me().drive().items("{id}").workbook().worksheets("{id|name}")
.buildRequest()
.get();

133093-qq%E5%9B%BE%E7%89%8720210917165556.png


0 Votes 0 ·
chenliao-5449 avatar image
0 Votes"
chenliao-5449 answered CarlZhao-MSFT edited

Files.ReadWrite is exist.

133039-123.png
may be the issue is I use the /users/{user id} api endpoint.

I only use the /me/...?



123.png (56.0 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes, you can only use the /me endpoint, and then you need to use the authorization flow that obtains the token in the delegation scenario, such as the auth code flow or ROPC flow, cannot use the client credential flow.

0 Votes 0 ·

Hi, has your problem been solved?

0 Votes 0 ·

thank you for you help

0 Votes 0 ·
CarlZhao-MSFT avatar image
0 Votes"
CarlZhao-MSFT answered CarlZhao-MSFT edited

This is an error caused by your use of the /users endpoint, don't use the /users/{user id} api endpoint, because the /users context is currently not supported. You can only use the /me endpoint, and then you need to use the authorization flow that obtains the token in the delegation scenario, such as the auth code flow or ROPC flow, cannot use the client credential flow.



If an Answer is helpful, please click "Accept Answer" and upvote it.


image.png (117.1 KiB)
304.png (113.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.