Register API Permissions in Azure Portal
Dan Dyer
37 steps
3 minutes
Azure
1
**Purpose**: This guide will walk you through creating an Azure application that enables Capacity to index content from your SharePoint environment. **Two Options Available**: - **Full Access Setup**: The Azure Application Configuration section will guide you through configuring an application with Sites.Read.All access to SharePoint. - **Limited Access Setup**: If you prefer to restrict Capacity's access to specific SharePoint sites only, follow both the Azure Application Configuration section AND the Sites Selected section.
Azure Application Configuration
2
Navigate to <https://portal.azure.com/#home>
3
Select App Registrations
4
Click + New registration
5
Enter a Name - No URI is needed
6
Click "Register"
7
Navigate to Manage -> API Permissions and Click Add a permission
8
Select Microsoft Graph
9
Select Application Permissions
10
Click the "Search box" field and search for sites.read.all
11
Click here.
12
Select Sites.Read.All (If you would prefer to select what sites Capacity has access to index, replace with Sites.Selected and Continue on. *Note; we can still specify what sites are indexed with Sites.Read.All*)
13
Click "Add permissions"
14
Select Grant Admin Consent for (your company name)
15
Click "Register"
16
Click "Yes"
17
Click "Certificates & secrets"
18
Click "+ New Client Secret"
19
Create a Description and choose an Expiration Cycle. - Please add a reminder for the expiration date
20
Click "Add"
21
Copy the Secret Value to provide to Capacity.
22
Click "Overview"
23
Copy the Application (client) ID and Directory (tenant) ID to provide to Capacity
24
Send the following information to Capacity Customer Success: \ **Application (client) ID\ Directory (tenant) ID\ Secret Value**
Sites.Read.All Setup can stop here
Sites Selected (optional)
25
If you would like to limit Capacity to access specific sites, go back to step one and create a second applcation. In this application, on Step 11, provide Sites.Selected access.
26
Navigate to <https://portal.azure.com/#home>
27
Select App Registrations
28
Click + New registration
29
Enter a Name - No URI is needed
30
Navigate to Manage -> API Permissions and Click Add a permission
31
Select Microsoft Graph
32
Select Application Permissions
33
Click the "Search box" field and search for **Sites.FullControl.All**
Tip!
34
Use the below curl request to give the read access to the App created to be used for Ingestion:[[ ]] POST <https://graph.microsoft.com/v1.0/sites/{sitesId}/permissions> Content-Type: application/json{[[ ]] "roles": \["read"\],[[ ]] "grantedToIdentities": \[{ "application": {[[ ]] "id": "89ea5c94-7736-4e25-95ad-3fa95f62b66e", //Target Application’s Client Id[[ ]] "displayName": "Contoso Time Manager App" //Target Application’s Display name[[ ]] }[[ ]] }\] }[[ ]]
35
\[Optional\] to search for a specific site use the site name and query below:[[ ]] curl --location '<https://graph.microsoft.com/v1.0/sites?search=example>' \\ --header 'Content-Type: application/json' \\ --header 'Authorization: <Bearer Token>'[[ ]] Siteid represents the id of the site for which read access is requested to be provided.[[ ]]
36
For the above request, the Bearer Token may be required. This token can be generatedwith another curl request which is shared below: curl --location --globoff '<https://login.microsoftonline.com/{TenantId}/oauth2/v2.0/token>' \\ \--header 'Content-Type: application/x-www-form-urlencoded' \\ \--header 'SdkVersion: postman-graph/v1.0' \\ \--data-urlencode 'grant_type=client_credentials' \\ \--data-urlencode 'client_id={client_id}' \\ \--data-urlencode 'client_secret={client_secret}' \\ \--data-urlencode 'scope=<https://graph.microsoft.com/.default>'
37
Send the following information collected in Step 24 to Capacity Customer Success: \ **Application (client) ID\ Directory (tenant) ID\ Secret ID**\ **List of Site URL to be indexed**
Register API Permissions in Azure Portal
Dan Dyer
37 steps
3 minutes
Azure
1
**Purpose**: This guide will walk you through creating an Azure application that enables Capacity to index content from your SharePoint environment. **Two Options Available**: - **Full Access Setup**: The Azure Application Configuration section will guide you through configuring an application with Sites.Read.All access to SharePoint. - **Limited Access Setup**: If you prefer to restrict Capacity's access to specific SharePoint sites only, follow both the Azure Application Configuration section AND the Sites Selected section.
Azure Application Configuration
2
Navigate to <https://portal.azure.com/#home>
3
Select App Registrations
4
Click + New registration
5
Enter a Name - No URI is needed
6
Click "Register"
7
Navigate to Manage -> API Permissions and Click Add a permission
8
Select Microsoft Graph
9
Select Application Permissions
10
Click the "Search box" field and search for sites.read.all
11
Click here.
12
Select Sites.Read.All (If you would prefer to select what sites Capacity has access to index, replace with Sites.Selected and Continue on. *Note; we can still specify what sites are indexed with Sites.Read.All*)
13
Click "Add permissions"
14
Select Grant Admin Consent for (your company name)
15
Click "Register"
16
Click "Yes"
17
Click "Certificates & secrets"
18
Click "+ New Client Secret"
19
Create a Description and choose an Expiration Cycle. - Please add a reminder for the expiration date
20
Click "Add"
21
Copy the Secret Value to provide to Capacity.
22
Click "Overview"
23
Copy the Application (client) ID and Directory (tenant) ID to provide to Capacity
24
Send the following information to Capacity Customer Success: \ **Application (client) ID\ Directory (tenant) ID\ Secret Value**
Sites.Read.All Setup can stop here
Sites Selected (optional)
25
If you would like to limit Capacity to access specific sites, go back to step one and create a second applcation. In this application, on Step 11, provide Sites.Selected access.
26
Navigate to <https://portal.azure.com/#home>
27
Select App Registrations
28
Click + New registration
29
Enter a Name - No URI is needed
30
Navigate to Manage -> API Permissions and Click Add a permission
31
Select Microsoft Graph
32
Select Application Permissions
33
Click the "Search box" field and search for **Sites.FullControl.All**
Tip!
34
Use the below curl request to give the read access to the App created to be used for Ingestion:[[ ]] POST <https://graph.microsoft.com/v1.0/sites/{sitesId}/permissions> Content-Type: application/json{[[ ]] "roles": \["read"\],[[ ]] "grantedToIdentities": \[{ "application": {[[ ]] "id": "89ea5c94-7736-4e25-95ad-3fa95f62b66e", //Target Application’s Client Id[[ ]] "displayName": "Contoso Time Manager App" //Target Application’s Display name[[ ]] }[[ ]] }\] }[[ ]]
35
\[Optional\] to search for a specific site use the site name and query below:[[ ]] curl --location '<https://graph.microsoft.com/v1.0/sites?search=example>' \\ --header 'Content-Type: application/json' \\ --header 'Authorization: <Bearer Token>'[[ ]] Siteid represents the id of the site for which read access is requested to be provided.[[ ]]
36
For the above request, the Bearer Token may be required. This token can be generatedwith another curl request which is shared below: curl --location --globoff '<https://login.microsoftonline.com/{TenantId}/oauth2/v2.0/token>' \\ \--header 'Content-Type: application/x-www-form-urlencoded' \\ \--header 'SdkVersion: postman-graph/v1.0' \\ \--data-urlencode 'grant_type=client_credentials' \\ \--data-urlencode 'client_id={client_id}' \\ \--data-urlencode 'client_secret={client_secret}' \\ \--data-urlencode 'scope=<https://graph.microsoft.com/.default>'
37
Send the following information collected in Step 24 to Capacity Customer Success: \ **Application (client) ID\ Directory (tenant) ID\ Secret ID**\ **List of Site URL to be indexed**