Skip to content

Commit 5508eb3

Browse files
authored
SharePoint connectors: add app permission request XML examples, use correct conventions for required/optional (#320)
1 parent 88f782a commit 5508eb3

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

snippets/general-shared-text/sharepoint.mdx

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,35 @@ allowfullscreen
1212

1313
- The SharePoint site URL.
1414

15-
- Site URLs typically have the format `https://[tenant].sharepoint.com`.
16-
- Relative site URLs typically have the format `https://[tenant].sharepoint.com/sites/<site_name>`.
17-
- To process all sites within a tenant, use a site URL of `https://[tenant]-admin.sharepoint.com`. This requires the app to be registered at a tenant level.
15+
- Site URLs typically have the format `https://<tenant>.sharepoint.com`.
16+
- Relative site URLs typically have the format `https://<tenant>.sharepoint.com/sites/<site_name>`.
17+
- To process all sites within a tenant, use a site URL of `https://<tenant>-admin.sharepoint.com`. This requires the app to be registered at a tenant level.
1818

1919
[Learn more](https://learn.microsoft.com/microsoft-365/community/query-string-url-tricks-sharepoint-m365).
2020

2121
- The path in the SharePoint site from which to start parsing files, for example `"Shared Documents"`. If the connector is to process all sites within the tenant, this filter will be applied to all site document libraries.
22-
- A SharePoint app principal with it application (client) ID, client secret, and access permissions to the SharePoint instance. [Get a client ID and client secret, and set access permissions](https://github.com/vgrem/Office365-REST-Python-Client/wiki/How-to-connect-to-SharePoint-Online-and-and-SharePoint-2013-2016-2019-on-premises--with-app-principal).
22+
- A SharePoint app principal with its application (client) ID, client secret, and access permissions to the SharePoint instance. [Get a client ID and client secret, and set access permissions](https://github.com/vgrem/Office365-REST-Python-Client/wiki/How-to-connect-to-SharePoint-Online-and-and-SharePoint-2013-2016-2019-on-premises--with-app-principal).
23+
24+
You can create SharePoint app principals through `https://<tenant>.sharepoint.com/_layouts/15/appregnew.aspx`.
25+
26+
For a SharePoint app principal with site-scoped permissions, use app permission request XML such as the following to grant
27+
permissions through `https://<tenant>.sharepoint.com/_layouts/15/appinv.aspx`:
28+
29+
```xml
30+
<AppPermissionRequests AllowAppOnlyPolicy="true">
31+
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" />
32+
</AppPermissionRequests>
33+
```
34+
35+
For a SharePoint app principal with tenant-scoped permissions, use app permission request XML such as the following to grant
36+
permissions through `https://<tenant>-admin.sharepoint.com/_layouts/15/appinv.aspx` instead:
37+
38+
```xml
39+
<AppPermissionRequests AllowAppOnlyPolicy="true">
40+
<AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" />
41+
</AppPermissionRequests>
42+
```
43+
44+
Available `Right` settings include `Read`, `Write`, `Manage`, and `FullControl`. To learn more, see
45+
[Add-in permissions in SharePoint](https://learn.microsoft.com/sharepoint/dev/sp-add-ins/add-in-permissions-in-sharepoint).
46+

0 commit comments

Comments
 (0)