0

I am trying to restrict the access of an Azure Application to one specific SharePoint list from one specific SharePoint site.

I have an Azure Application which has Application permissions for Sites.Selected and the new Lists.SelectedOperations.Selected permission.

Then I followed the instructions provided here:

https://learn.microsoft.com/en-us/graph/permissions-selected-overview?tabs=http

I sent the following request with an authentication token retrieved with the CLIENT_ID, TENANT_ID and CLIENT_SECRET from the Azure App.

POST https://graph.microsoft.com/beta/sites/{siteId}/lists/{listId}/permissions
Content-Type: application/json

{
  "roles": ["read"],
  "grantedTo": {
    "application": {
      "id": "{appId}"
     }
  }
}

This request returns status code 201 and says that the permission is created, but when I check using

GET https://graph.microsoft.com/beta/sites/{siteId}/lists/{listId}/permissions

the new permission is not saved there. Moreover, even though I have the Lists.SelectedOperations.Selected permission, I have access to all the lists in specific Site.

I am not sure whether there is something that I am doing wrong, or I am missing some steps in the process.

Any help is appreciated.

Thank you!

3
  • Does the app have a permission granted for the same site? It can explain why you can access all lists. Commented Jul 3 at 7:54
  • Yes, by removing that permission the app doesn't have access to any list item in any list in the site. After that by adding the permission for the list it says 201 created but the permission is not added. Apparently, Microsoft is still working on this feature. Commented Jul 3 at 11:10
  • Refer this SO Thread , are you looking for such kind of output? Commented Jul 18 at 10:50

0