Microsoft Graph Get Shared from external

Đặng Thế Dân 1 Reputation point
2020-06-03T04:11:47.333+00:00

I'm working with microsoft graph rest api.
I'm using : /me/drive/sharedWithMe but it's not return the shared file/folder from external .
How can i get the sahred from external users?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,428 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. soumi-MSFT 11,716 Reputation points Microsoft Employee
    2020-06-03T17:29:43.12+00:00

    @Đặng Thế Dân , Can you check and confirm if you have the following permissions in place:

    • Delegated (work or school account) Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Sites.ReadWrite.All
    • Delegated (personal Microsoft account) Files.Read.All, Files.ReadWrite.All
    • Application Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Sites.ReadWrite.All

    Reference Article: https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/shareddriveitem?view=odsp-graph-online

    If these permissions are in place and still the api is not returning and thing then I would like to know what exact error you are getting when you call the api.

    There is a shared resource on the driveitem. You should be able to filter on that property to find files and folders shared with other people.

    Hope this helps.

    Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.