Manually Grant SharePoint Site Access
This guide provides a step-by-step walkthrough for granting specific SharePoint sites permissions to a given target application.
You can use PnP PowerShell or Microsoft Graph API to grant the app access to specific SharePoint sites with only Read
permission.
π Microsoft Graph API Documentation (shown below)
1. Create an Admin App
Create Admin App with
Sites.FullControl.All
permission. For a step-by-step guide, check the admin app section onCreate a Sharepoint Connection.
2. Get access token of Admin App by Postman
Use the
Client Id
,Client Secret Key
,Tenant Id
of the Admin App toPOST
tohttps://login.microsoftonline.com/<tenant_id>/oauth2/token

3. Get the Sharepoint site id
Create a
GET
request tohttps://graph.microsoft.com/v1.0/sites/
with theaccess_token
from the previous step asBearer Token
auth and save the returnedid
.

4. Assign SharePoint site permission to target application
Create a
POST
request tohttp://graph.microsoft.com/v1.0/sites/<site_id>/permissions
with the following JSON payload:
{
"roles": [
"read"
],
"grantedToIdentities": [
{
"application": {
"id": {target_application_id},
"displayName": "displayName"
}
}
]
}

5. Add Sharepoint site on Blockbrain platform
Continue with
5. Configure SharePoint Integration in Blockbrain
on Sharepoint Manual Site Setup
Last updated