question

WMioConnectors-6974 avatar image
0 Votes"
WMioConnectors-6974 asked saldana-msft edited

"Item not found" error is returned when i try to get file details that has been shared by the external user

Hi,

Shared with me API provides me the list of all files and folders that are shared by internal and external users.
The Shared API URL is mentioned below
https://docs.microsoft.com/en-us/graph/api/drive-sharedwithme?view=graph-rest-1.0&tabs=http

But when I try to access the shared DriveItem resource of the file that has been shared by the external user bypassing DriveID and File ID into the API
/drives/{remoteItem-driveId}/items/{remoteItem-id}
The API throws an error as -
{
"error": {
"code": "itemNotFound",
"message": "Item not found",
"innerError": {
"date": "2020-10-20T12:07:39",
"request-id": "5a3b3836-fe3e-450a-837e-1b3e962ac94b",
"client-request-id": "5a3b3836-fe3e-450a-837e-1b3e962ac94b"
}
}
}

But the Same API works fine with the file shared with Internal Users.
Am I missing something here any help is greatly appreciated?

Regards,
Kuldeep K




microsoft-graph-usersmicrosoft-graph-sites-lists
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.

1 Answer

Deva-MSFT avatar image
0 Votes"
Deva-MSFT answered

To include items shared from external tenants, append ?allowexternal=true to the GET request. So i wonder have you tried this?

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.