You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sp-add-ins/sharepoint-admin-apis-authentication-and-authorization.md
+7-13Lines changed: 7 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -16,33 +16,27 @@ SharePoint admin APIs are accessible via [SharePoint client object model (CSOM)]
16
16
17
17
Here are some key principles about SharePoint admin APIs authentication and authorization:
18
18
19
-
- Admin APIs can be called by administrators (including users with [granular delegated admin privileges (GDAP)](/partner-center/gdap-supported-workloads#sharepoint)) and applications registered in Microsoft Entra.
20
19
- Each admin API defines the least-permissive permission a caller should have to call the API.
21
20
- We use role-based access control to assert a caller can call a particular admin API. If the caller has not been granted the required permission, they'll get an unauthorized access error.
22
21
23
22
## Pre-Requisites
24
23
25
-
- Caller is a user with an assigned administrator role in Microsoft Entra, or
26
24
- Caller is a registered Microsoft Entra application with the right application permissions.
27
25
28
26
## Authorization
29
27
30
-
SharePoint admin APIs can be called by users with assigned administrator roles in Microsoft Entra, or by applications registered in Microsoft Entra configured with [access on behalf of a user](/graph/auth-v2-user) or [access without a user](/graph/auth-v2-service).
31
-
32
-
### Access via administrator role
33
-
34
-
Users in a tenant can be granted administrator roles via [Microsoft admin center](/microsoft-365/admin/add-users/about-admin-roles) or [Microsoft Entra](/entra/fundamentals/users-assign-role-azure-portal). Not all administrator roles have access to all the admin APIs, and some administrator roles do not have access to any admin APIs at all. For example, users with [Global Reader](/entra/identity/role-based-access-control/permissions-reference#global-reader) role have access to read admin APIs, but have no access to admin APIs that make any updates.
28
+
SharePoint admin APIs can be called by applications registered in Microsoft Entra configured with [access on behalf of a user](/graph/auth-v2-user) or [access without a user](/graph/auth-v2-service).
35
29
36
30
### Application access on behalf of a user
37
31
38
32
Admin API operations [on behalf of a user](/graph/auth-v2-user) require applications to receive consent for SharePoint `AllSites.FullControl` application permission. This permission requires admin consent on the consuming tenant before any user from the tenant can consent to it.
39
33
40
34
### Application access without a user
41
35
42
-
Admin API operations [without a user](/graph/auth-v2-service) require applications to receive consent for Microsoft Graph [`Sites.FullControl.All`](/graph/permissions-reference#sitesfullcontrolall) application permission. This permission requires admin consent on the consuming tenant.
36
+
Admin API operations [without a user](/graph/auth-v2-service) require applications to receive consent for `Sites.FullControl.All` application permission on the SharePoint resource. This permission requires admin consent on the consuming tenant.
43
37
44
38
> [!IMPORTANT]
45
-
> When an application is to be used, using one with user-delegated application permissions is the recommended approach. This type of access enhances the security of your tenant and improves auditability of actions performed by the application. For all applications, an administrator on the consuming tenant must consent to your application's request for permission. Learn more [here](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal).
39
+
> Using application access on behalf of a user is the recommended approach. This type of access enhances the security of your tenant and improves auditability of actions performed by the application. For all applications, an administrator on the consuming tenant must consent to your application's request for permission. Learn more [here](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal).
46
40
47
41
> [!NOTE]
48
42
> We are currently working on providing more granular, less-permissive scopes for applications to use based on what admin APIs the applications want to have access to. We'll share more information in due course when this is ready for adoption.
@@ -54,9 +48,9 @@ Here are some actions you can take next to use applications for admin API calls:
54
48
1. Configure your [application manifest](/entra/identity-platform/reference-app-manifest#requiredresourceaccess-attribute) to request the required permissions for Office 365 SharePoint Online (resourceAppId: `00000003-0000-0ff1-ce00-000000000000`).
55
49
1.[Grant admin consent](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal) to your application on the target tenant.
56
50
57
-
| Access type | Permission name |`resourceAccess` id |`resourceAccess` type |
0 commit comments