Possible to limit SharePoint API/ Graph API access to a specific Sharepoint List?

Arvidsson, Alexander 0 Reputation points
2024-04-24T08:15:26.4133333+00:00

Hi,

Currently working at a project for a client where we need to develop an API that connects and syncs items to and from one of their SharePoint lists.

The client's concern is that our API will be able to access all contents on their SharePoint site. Is it possible to restrict our access to the Graph API in a way where we can only access that one SharePoint list and nothing else?

As the API we're connecting from is hosted outside their tenant we're thinking of having the client create a multitenant application with delegated access on Microsoft Entra ID and then connect through oauth to the API.

I've never really worked with Microsoft Entra ID before but would it be possible to enable some kind of limited access for the delegated user?

Thank you!

Alexander Arvidsson

Microsoft 365 and Office SharePoint For business Windows
Microsoft Security Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2024-04-25T01:58:06.05+00:00

    Hi @Arvidsson, Alexander,

    I would recommend you to use Sites.Selected permission to reach your requirement. As with other delegated scopes the minimal intersection of application and user permissions is used. Increasing the ability of admins to control application access to specific site collections and require user presence/access. Here is some document for you to reference

    https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins-modernize/understanding-rsc-for-msgraph-and-sharepoint-online

    https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/develop-applications-that-use-sites-selected-permissions-for-spo/ba-p/3790476


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

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