Share via

Is there a way to filter out sites user has access to from given list of site ids

Manohar onmi 0 Reputation points
2025-02-05T11:03:52.3566667+00:00

Hello,

Is there a way to check if user has access to given list of sites in one api call?

For example: lets say there are site1, site2, site3 and i want to know if there is away to verify if user has access to all these sites or get sites(site1, site2) that user has access to

Microsoft Security | Microsoft Graph
0 comments No comments

2 answers

Sort by: Most helpful
  1. Saranya Madhu-MSFT 2,375 Reputation points Microsoft External Staff
    2025-02-06T10:47:39.2533333+00:00

    Hi Manohar onmi,

    Thanks for reaching out to Microsoft!

    As mentioned in the document, The SharePoint API in Microsoft Graph supports the following core scenarios:

    Access to SharePoint sites, lists, and drives (document libraries)

    Read-only support for site resources (no ability to create new sites)

    Read-write support for lists, listItems, and driveItems

    Read-write support for tenant-level SharePointSettings

    Address resources by SharePoint ID, URL, or relative path.

    Currently there isn't a direct endpoint to check multiple sites in one call using Graph API. Since this feature/functionality is presently not available, you can submit a feature request idea using this support link, which will be monitored by Microsoft team and make the enhancements to Microsoft Graph APIs. I will also upvote for you. 

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    Was this answer helpful?

    0 comments No comments

  2. CarlZhao-MSFT 46,456 Reputation points
    2025-02-06T09:16:04.97+00:00

    Hi @Manohar onmi

    No, it is not possible to check if a user has access to a given set of sites with a single API call. You must iterate through the set of sites to get the permissions information for each site to determine if the user has access to that site.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.