Skip to content

Commit 5c53717

Browse files
authored
[DOCS] Updates SharePoint Online page (#118318) (#119057)
1 parent 181908c commit 5c53717

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed

docs/reference/connector/docs/connectors-sharepoint-online.asciidoc

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,58 @@ The application name will appear in the Title box.
133133
</AppPermissionRequests>
134134
----
135135
136+
[discrete#es-connectors-sharepoint-online-sites-selected-permissions]
137+
====== Granting `Sites.Selected` permissions
138+
139+
To configure `Sites.Selected` permissions, follow these steps in the Azure Active Directory portal. These permissions enable precise access control to specific SharePoint sites.
140+
141+
. Sign in to the https://portal.azure.com/[Azure Active Directory portal^].
142+
. Navigate to **App registrations** and locate the application created for the connector.
143+
. Under **API permissions**, click **Add permission**.
144+
. Select **Microsoft Graph** > **Application permissions**, then add `Sites.Selected`.
145+
. Click **Grant admin consent** to approve the permission.
146+
147+
[TIP]
148+
====
149+
Refer to the official https://learn.microsoft.com/en-us/graph/permissions-reference[Microsoft documentation] for managing permissions in Azure AD.
150+
====
151+
152+
To assign access to specific SharePoint sites using `Sites.Selected`:
153+
154+
. Use Microsoft Graph Explorer or PowerShell to grant access.
155+
. To fetch the site ID, run the following Graph API query:
156+
+
157+
[source, http]
158+
----
159+
GET https://graph.microsoft.com/v1.0/sites?select=webUrl,Title,Id&$search="<Name of the site>*"
160+
----
161+
+
162+
This will return the `id` of the site.
163+
164+
. Use the `id` to assign read or write access:
165+
+
166+
[source, http]
167+
----
168+
POST https://graph.microsoft.com/v1.0/sites/<siteId>/permissions
169+
{
170+
"roles": ["read"], // or "write"
171+
"grantedToIdentities": [
172+
{
173+
"application": {
174+
"id": "<App_Client_ID>",
175+
"displayName": "<App_Display_Name>"
176+
}
177+
}
178+
]
179+
}
180+
----
181+
182+
[NOTE]
183+
====
184+
When using the `Comma-separated list of sites` configuration field, ensure the sites specified match those granted `Sites.Selected` permission in SharePoint.
185+
If the `Comma-separated list of sites` field is set to `*` or the `Enumerate all sites` toggle is enabled, the connector will attempt to access all sites. This requires broader permissions, which are not supported with `Sites.Selected`.
186+
====
187+
136188
.Graph API permissions
137189
****
138190
Microsoft recommends using Graph API for all operations with Sharepoint Online. Graph API is well-documented and more efficient at fetching data, which helps avoid throttling.
@@ -594,6 +646,59 @@ The application name will appear in the Title box.
594646
</AppPermissionRequests>
595647
----
596648
649+
[discrete#es-connectors-sharepoint-online-sites-selected-permissions-self-managed]
650+
====== Granting `Sites.Selected` permissions
651+
652+
To configure `Sites.Selected` permissions, follow these steps in the Azure Active Directory portal. These permissions enable precise access control to specific SharePoint sites.
653+
654+
. Sign in to the https://portal.azure.com/[Azure Active Directory portal^].
655+
. Navigate to **App registrations** and locate the application created for the connector.
656+
. Under **API permissions**, click **Add permission**.
657+
. Select **Microsoft Graph** > **Application permissions**, then add `Sites.Selected`.
658+
. Click **Grant admin consent** to approve the permission.
659+
660+
[TIP]
661+
====
662+
Refer to the official https://learn.microsoft.com/en-us/graph/permissions-reference[Microsoft documentation] for managing permissions in Azure AD.
663+
====
664+
665+
666+
To assign access to specific SharePoint sites using `Sites.Selected`:
667+
668+
. Use Microsoft Graph Explorer or PowerShell to grant access.
669+
. To fetch the site ID, run the following Graph API query:
670+
+
671+
[source, http]
672+
----
673+
GET https://graph.microsoft.com/v1.0/sites?select=webUrl,Title,Id&$search="<Name of the site>*"
674+
----
675+
+
676+
This will return the `id` of the site.
677+
678+
. Use the `id` to assign read or write access:
679+
+
680+
[source, http]
681+
----
682+
POST https://graph.microsoft.com/v1.0/sites/<siteId>/permissions
683+
{
684+
"roles": ["read"], // or "write"
685+
"grantedToIdentities": [
686+
{
687+
"application": {
688+
"id": "<App_Client_ID>",
689+
"displayName": "<App_Display_Name>"
690+
}
691+
}
692+
]
693+
}
694+
----
695+
696+
[NOTE]
697+
====
698+
When using the `Comma-separated list of sites` configuration field, ensure the sites specified match those granted `Sites.Selected` permission in SharePoint.
699+
If the `Comma-separated list of sites` field is set to `*` or the `Enumerate all sites` toggle is enabled, the connector will attempt to access all sites. This requires broader permissions, which are not supported with `Sites.Selected`.
700+
====
701+
597702
.Graph API permissions
598703
****
599704
Microsoft recommends using Graph API for all operations with Sharepoint Online. Graph API is well-documented and more efficient at fetching data, which helps avoid throttling.

0 commit comments

Comments
 (0)