Note: Please attempt the steps Section 2 of this article before using this method - unless you have been advised by our team!
Granting access to drive
The instructions in this section are for granting read-only access to one SharePoint drive. These steps need to be performed for each SharePoint drive from which files will be synced.
-
Go to
Microsoft Graph Explorer: https://developer.microsoft.com/en-us/graph/graph-explorer Click on the login button in the top-right corner and login as a user, who has admin control over the SharePoint Site. - First Microsoft Graph Explorer needs permission to modify sites. To grant this permission, complete the following steps:
-
In the top-right corner, click on your avatar, then click the
Consent to permissionslink in the popup. -
In the
Permissionsdrawer that opens, find theSites.FullControl.Allpermission and click theConsentbutton.
-
- Given a
SharePointsite with the following URL: https://acme-corp.sharepoint.com/sites/ComplyanceSharepointIntegration Construct a URL with the following format: https://graph.microsoft.com/v1.0/sites/acme-corp.sharepoint.com:/sites/ComplyanceSharepointIntegration:/drives
Steps to transform the original SharePoint URL:
1. Remove the https:// prefix: acme-corp.sharepoint.com/sites/ComplyanceSharepointIntegration
2. Insert a colon between .com and /: acme-corp.sharepoint.com:/sites/ComplyanceSharepointIntegration
3. Add the prefix https://graph.microsoft.com/v1.0/sites/: https://graph.microsoft.com/v1.0/sites/acme-corp.sharepoint.com:/sites/ComplyanceSharepointIntegration
4. Add the suffix :/drives: https://graph.microsoft.com/v1.0/sites/acme-corp.sharepoint.com:/sites/ComplyanceSharepointIntegration:/drives
After that:
1. Paste the final constructed URL into the query input and click `Run query`
2. In the `Response preview` tab, find the drive that should be granted access and copy its ID.
-
Construct the following URL, replacing the
{drive_id}placeholder with the drive ID from the previous step: https://graph.microsoft.com/v1.0/drives/{drive_id}/root/permissionsAfter that:
- Change the request method to
POST. - Paste the final constructed URL into the query input.
-
Paste the following payload into the
Request Bodytab:{ "roles": [ "read" ], "grantedTo": { "application": { "id": "6c382c8c-f13d-41b6-a39e-3911074374a5", "displayName": "Complyance SharePoint Integration" } } } -
Click
Run queryand confirm that the permission was successfully created.
- Change the request method to
Your new site/drive has been configured and is ready to be pulling evidence into Complyance!