An app with Sites.ReadWrite.All or Sites.FullControl.All can read or change every site collection and every OneDrive in the tenant, even when it only ever works with one site. Microsoft's Selected permission family lets the same app reach only the sites, lists or files an administrator explicitly assigns. This guide walks the migration end to end for SharePoint: find every app-only grant that reaches SharePoint, including grants on the SharePoint Online API and leftovers from the retired Azure ACS model, choose the right Selected scope, grant access per site, test, and then remove the tenant-wide permission. It is for Microsoft 365 administrators, identity engineers and the developers who own SharePoint integrations. Finding high-privilege Graph permissions in general is covered in How to find high-privilege Microsoft Graph application permissions; this page starts where that one hands off for SharePoint.
App-only access means the application calls SharePoint with its own token, with no signed-in user, so nothing intersects its permissions with a person's. Microsoft's Selected permissions documentation calls application-only tokens higher risk for exactly that reason.
This is an independent guide from NHI Mgmt Group, based on Microsoft's public documentation as of November 2026. It is not sponsored or reviewed by Microsoft. Product features change, so confirm settings against Microsoft's current documentation.
Key takeaways
- Look in three places. Tenant-wide SharePoint access can come from Microsoft Graph application permissions, from SharePoint Online API application permissions, and from legacy Azure ACS app principals.
- Selected starts at zero. Consenting to Sites.Selected grants nothing; the app works only after a role (read, write, owner or fullcontrol) is assigned on a specific site, list, item or file.
- The granting tool is privileged. Assigning site permissions needs Sites.FullControl.All, so run grants from a separate, tightly owned admin identity, never from the app being scoped.
- Revoke last, and revoke properly. Remove the broad grant only after the scoped grant is proven, and remember that revoking a broader scope does not remove narrower grants.
- ACS is retired. Microsoft's announced timeline ended Azure ACS for SharePoint Online on 2 April 2026, with no extension option, so any app still built on it needs an Entra app registration.
Where tenant-wide SharePoint access hides
| Source | What to look for | How to find it |
|---|---|---|
| Microsoft Graph application permissions | Sites.Read.All, Sites.ReadWrite.All, Sites.Manage.All, Sites.FullControl.All, Files.Read.All, Files.ReadWrite.All | App role assignments on the Microsoft Graph service principal (appId 00000003-0000-0000-c000-000000000000) |
| SharePoint Online API application permissions | The same Sites.*.All names, used by apps calling SharePoint REST or CSOM directly | App role assignments on the Office 365 SharePoint Online service principal (appId 00000003-0000-0ff1-ce00-000000000000) |
| Azure ACS app principals | Add-in style principals registered through the SharePoint app registration pages, often with app-only rights at tenant or site scope | Microsoft 365 Assessment tool, Azure ACS Report (lists each principal, its scopes, whether app-only is allowed and the sites it reaches) |
Many inventories stop at Graph. An integration built on PnP or CSOM usually holds its permission on the SharePoint Online resource instead, and it will not appear in a Graph-only report. Query GET /servicePrincipals/{id}/appRoleAssignedTo for both resource service principals and match the app role IDs to their names in each resource's appRoles collection.
The Selected permission family
| Scope | Level it can be granted at | Grant endpoint |
|---|---|---|
Sites.Selected | Site collection | POST /sites/{siteId}/permissions |
Lists.SelectedOperations.Selected | List | POST /sites/{siteId}/lists/{listId}/permissions |
ListItems.SelectedOperations.Selected | List item, file or folder | The list item's permissions endpoint |
Files.SelectedOperations.Selected | File or library folder (document libraries only) | The drive item's permissions endpoint |
Microsoft documents three required steps, and missing any of them leaves the app with no access: consent to the Selected scope in Entra ID, grant a role on the resource, and acquire a token that contains the scope. Roles are read, write, owner and fullcontrol. All Selected scopes work in both application and delegated mode; in delegated mode the app's and the user's permissions are intersected. The deeper comparison with Exchange RBAC for Applications is in the Microsoft 365 Application Access Policies and RBAC for Applications Guide.
Choosing the replacement scope
| What the integration does | Replace with | Watch out for |
|---|---|---|
| Reads documents from one or a few sites | Sites.Selected with read on each site | New sites need a new grant; build this into the site request process |
| Writes to a single list (forms, ticket sync) | Lists.SelectedOperations.Selected with write on the list | List-level grants break permission inheritance and count towards SharePoint's unique permission limits |
| Provisions lists or changes site settings | Sites.Selected with owner or fullcontrol on that site only | Owner and fullcontrol on a site can grant list permissions; treat as privileged |
| Acts for a signed-in user | Delegated Selected scope | Preferred where a user is present; access never exceeds the user's |
| Genuinely needs every site (backup, eDiscovery, migration) | Keep the tenant-wide grant with a documented reason, certificate credential and monitoring | Review on a fixed schedule; this is the exception, not the default |
Step-by-step migration
- Build the inventory. Export app role assignments for the Graph and SharePoint Online service principals and keep the
Sites.*.AllandFiles.*.Allrows. Add each app's owner, credential type and last sign-in. Run the Microsoft 365 Assessment tool for ACS principals if the tenant is old enough to have them. - Find which sites each app really uses. For Graph callers, Microsoft Graph activity logs record
AppId,ServicePrincipalId,RequestUriand the token'sRoles; group by app and site path over at least a full business cycle. They need Entra ID P1 or P2 and a diagnostic setting, and events usually arrive within 30 minutes. For SharePoint REST or CSOM callers, use the unified audit log and the owner's own configuration. See the Microsoft Graph Activity Logs page. - Set up the granting identity. Creating a site permission through Graph needs
Sites.FullControl.All(application or delegated; delegated callers also need a SharePoint Administrator role or higher and membership of the site). Use a dedicated admin app or an admin running PnP PowerShell interactively, with ownership limited to the platform team. PnP'sGrant-PnPEntraIDAppSitePermissiontakes-AppId,-DisplayName,-Permissions(Read, Write, Manage or FullControl) and-Site, and its documentation states it needs delegatedSites.FullControl.All. - Add the Selected scope to the app. Add
Sites.Selected(or a finer scope) on the same resource the app calls, Graph or SharePoint Online, and grant admin consent. The app still has its broad grant at this point, so nothing breaks. - Grant each site. Call
POST /sites/{siteId}/permissionswith the role and the app's client ID ingrantedToIdentities(a201 Createdresponse returns the permission, includinggrantedToIdentitiesV2). Record the permission ID per site in the change ticket. - Test with only the Selected scope. In a test tenant, or with a second app registration that holds only
Sites.Selected, run the integration's real operations against granted and ungranted sites. Expect success on granted sites and access denied elsewhere. - Check the credential. Microsoft's Entra app-only guidance for SharePoint REST and CSOM states that app-only access requires a certificate, and other options are blocked with Access Denied. Graph calls accept other credential types, but moving to a certificate or federated credential is the safer default; see How to replace Azure app secrets with federated credentials.
- Remove the tenant-wide grant. Delete the
Sites.*.Allapp role assignment from the service principal and remove it from the app registration's requested permissions so the next consent does not bring it back. A fresh token is needed before the change shows; watch for errors for a few days. - Verify. List grants with
GET /sites/{siteId}/permissions(it also needsSites.FullControl.All, and does not list subsite permissions) and confirm the token now carries only the Selected role in Graph activity logs.
Rollback: re-add the broad app role assignment for a time-boxed window while you fix a missing site grant, then remove it again. To withdraw scoped access, delete the site or list permission, or revoke the Selected consent in Entra ID, which blocks every site the app was granted through that scope. Revoking Sites.* leaves access granted through Lists.* in place, so check each level.
Legacy Azure ACS app-only access
Azure ACS was used in SharePoint Online to authenticate provider-hosted add-ins and to grant apps access, including app-only access. Microsoft's retirement announcement set two dates: ACS stopped working for new tenants on 1 November 2024, and it was fully retired for existing tenants on 2 April 2026, with no option to extend, across all environments including Government Clouds. SharePoint Add-ins were retired with it. SharePoint Server on-premises is not affected.
- If something broke in April 2026: an integration that silently stopped is likely an ACS principal. Rebuild it as an Entra app registration with a certificate and a Selected scope, not with
Sites.FullControl.Allas a quick fix. - Keep the tenant switch closed:
Set-SPOTenant -DisableCustomAppAuthentication $trueturns off ACS app-only access, and new tenants have it disabled by default. The wider tenant settings are in the SharePoint and OneDrive Security Guide. - Clean up stored secrets: ACS principals used client secrets; remove copies from configuration files and vaults so they do not confuse later scans.
Decision guidance
Graph or SharePoint Online resource: grant the Selected scope on the resource the code calls. A Graph-only grant does nothing for a CSOM client. Site or list: use site level unless the integration touches a single list and inheritance limits are not a concern. Small tenants with a handful of integrations can grant by hand with PnP PowerShell and track grants in a spreadsheet. Large tenants should put site grants behind a request workflow run by the granting app, with each grant tied to an owner and reviewed with site access reviews. Vendor SaaS integrations that request tenant-wide access are worth challenging before consent: ask whether the product supports Sites.Selected. The consent side is covered in the Entra ID Applications and Consent Guide.
Where identity fits
A scoped permission only helps if the identity holding it is governed. App registration owners can add credentials to the app, so an owner who adds a secret to an app with a site grant gains that site's access; keep ownership to named service owners and review it with the permission. Give each integration its own app registration rather than one shared "SharePoint connector" app, so a grant, a log line and an owner all point to one system. When an integration is retired, delete its site permissions as well as its app, so site permission lists stay accurate for later reviews. Stale apps are covered in How to find and remove stale service principals in Entra ID, and credential expiry in How to find expiring app secrets and certificates in Entra ID.
Detection and measurement
- New broad grants: Entra audit events "Add app role assignment to service principal" where the resource is Graph or SharePoint Online and the role is a
Sites.*.AllorFiles.*.Allpermission. - New site grants: calls to
/sites/{id}/permissionsin Graph activity logs, expected only from the granting identity. - Out-of-scope attempts: 403 responses for a scoped app against sites it was not granted, which may indicate a missing grant or misuse.
- Credential changes: new secrets or certificates on scoped apps, which matter as much as permission changes.
Metrics that show progress:
- Number of apps holding tenant-wide SharePoint or Files application permissions, on Graph and SharePoint Online combined (target: only documented exceptions).
- Share of SharePoint integrations on Selected scopes.
- Site grants without a recorded owner or ticket (target zero).
- Scoped apps still using client secrets for SharePoint access.
- Time from site creation request to scoped grant, so the process does not push teams back to broad scopes.
Framework mapping
| Framework | Reference | How this work supports it |
|---|---|---|
| NIST CSF 2.0 | PR.AA-05 | App access to sites is defined, scoped to need and reviewed |
| NIST SP 800-53 Rev 5 | AC-6, AC-3 | Least privilege and enforced access to named sites |
| NIST SP 800-53 Rev 5 | IA-5 | Certificate or federated credentials replace shared secrets |
| ISO/IEC 27001:2022 Annex A | A.5.15 Access control, A.8.3 Information access restriction | Integrations reach only the information they need |
| MITRE ATT&CK | T1528, T1098.003 | A stolen app token reaches fewer sites; new role grants are monitored |
Common failure patterns
- Granting Sites.Selected but leaving Sites.ReadWrite.All: the token still carries the broad role, so nothing is scoped. Remove the broad grant and the requested permission.
- Giving the app FullControl so it can grant itself: this defeats the purpose. Keep the granting identity separate.
- Granting on Graph when the app calls SharePoint REST: the integration fails, and the team restores the old permission under pressure.
- List-level grants everywhere: each breaks inheritance and adds unique permission scopes, which becomes hard to review.
- Assuming revocation cascades: revoking the site scope does not remove list or item grants made through narrower scopes.
- Restoring an ACS integration with a broad Entra grant: the April 2026 outage is fixed, but the app now has more access than it ever needed.
Practitioner checklist
- Export SharePoint and Files application permissions from both the Graph and SharePoint Online service principals.
- Run the Microsoft 365 Assessment tool ACS report and rebuild any ACS-based integration on Entra.
- Confirm
DisableCustomAppAuthenticationis true for the tenant. - Map each app to the sites it uses from Graph activity logs and the unified audit log.
- Create a separate granting identity with
Sites.FullControl.All, owned by the platform team. - Add the Selected scope on the resource the app calls, grant per site, and record each permission ID.
- Test with only the Selected scope before removing the broad grant.
- Remove the broad app role assignment and the requested permission from the app registration.
- Use certificates for SharePoint REST and CSOM app-only access.
- Alert on new
Sites.*.Allgrants and on site permission calls from any identity other than the granting app.
Standards and references
- Microsoft Learn: Selected permissions in OneDrive and SharePoint
- Microsoft Graph: Create permission on a site
- Microsoft Graph: List site permissions
- Microsoft Learn: Azure ACS retirement in Microsoft 365
- Microsoft Learn: Granting access via Entra ID app-only
- Microsoft Learn: Microsoft Graph activity logs
- PnP PowerShell: Grant-PnPEntraIDAppSitePermission
Related NHI Mgmt Group resources: How to find high-privilege Microsoft Graph application permissions · Microsoft 365 Application Access Policies and RBAC for Applications Guide · SharePoint and OneDrive Security Guide · How to find and remove stale service principals in Entra ID