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.Allpermission. 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 Idof the Admin App toPOSTtohttps://login.microsoftonline.com/<tenant_id>/oauth2/token

3. Get the Sharepoint site id
Create a
GETrequest tohttps://graph.microsoft.com/v1.0/sites/with theaccess_tokenfrom the previous step asBearer Tokenauth and save the returnedid.

4. Assign SharePoint site permission to target application
Create a
POSTrequest tohttp://graph.microsoft.com/v1.0/sites/<site_id>/permissionswith 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 Blockbrainon Sharepoint Manual Site Setup
Last updated

