Manually Grant SharePoint Site Access
This guide provides a step-by-step walkthrough for granting specific SharePoint sites permissions to a given target application.
Last updated
This guide provides a step-by-step walkthrough for granting specific SharePoint sites permissions to a given target application.
Prerequisites: Before proceeding, ensure you have Site Admin rights on the target SharePoint site. You can verify this by navigating to _layouts/15/mngsiteadmin.aspx on your SharePoint site. Additionally, the SharePoint site permissions must be set to Full Access for this step to work.
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)
Create Admin App with Sites.FullControl.All permission. For a step-by-step guide, check the admin app section onCreate a Sharepoint Connection.
Use the Client Id, Client Secret Key, Tenant Id of the Admin App to POST to https://login.microsoftonline.com/<tenant_id>/oauth2/token

Create a GET request to https://graph.microsoft.com/v1.0/sites/ with the access_token from the previous step as Bearer Token auth and save the returned id .

Create a POST request to http://graph.microsoft.com/v1.0/sites/<site_id>/permissions with the following JSON payload:

Continue with 5. Configure SharePoint Integration in Blockbrain on Sharepoint Manual Site Setup
Last updated
{
"roles": [
"read"
],
"grantedToIdentities": [
{
"application": {
"id": YOUR_TARGET_APPLICATION_ID,
"displayName": "displayName"
}
}
]
}
