A cloud-based identity and access management service for securing user authentication and resource access
Use Selected permissions so the app is restricted to just the target list, even if it is in a subsite.
- In Microsoft Entra app registration
- Grant the app the appropriate Selected scope for lists, for example the application or delegated
Lists.SelectedOperations.Selectedscope. - An admin must consent to this scope.
- Grant the app the appropriate Selected scope for lists, for example the application or delegated
- Grant the app access to the specific list (in the child site)
- Resolve the site and list IDs for
Parent site -> Child site -> List. - Call Microsoft Graph to assign permissions at list level:
POST /sites/{siteId}/lists/{listId}/permissions Content-Type: application/json { "roles": ["read"], "grantedToIdentities": [ { "application": { "id": "{clientId}", "displayName": "{application-name}" } } ] } - Here
rolescan beread,write,manage, orfullcontrol. Usereadto restrict to read-only.
- Resolve the site and list IDs for
- Acquire tokens and call the list
- The app must request an access token that includes the
Lists.SelectedOperations.Selectedscope. - With that token, the app can call Graph or SharePoint APIs against only the permissioned list.
- The app must request an access token that includes the
- How this avoids broader scope
- Selected scopes (
*.Selectedand*.SelectedOperations.Selected) give no access by themselves. Access is granted only where an explicit permission object exists (for example, on that single list). - Without a
POST /sites/{siteId}/lists/{listId}/permissionsassignment, the app has no access, even though the scope is consented.
- Selected scopes (
This works the same regardless of whether the list is on the root site or a subsite; the key is using the list’s siteId and listId and assigning a read role only to that list.
References: