How to enable Anchor integration on OneDrive/SharePoint
  • 09 Sep 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

How to enable Anchor integration on OneDrive/SharePoint

  • Dark
    Light

This article will discuss how to enable the Anchor integration on SharePoint.
Create an Azure app (requires Admin access)

Step 1: Go to https://portal.azure.com/

Step 2: Click on Azure Active Directory

Step 3: Click on App Registrations from the menu items on the left.

Step 4: Click on New registration on top of the page.

Step 5: Give the app a name.

  1. Our recommendation is: Anchor

Step 6: Select the account type and provide a redirect URL, and select app type as web

  1. Account Type: Accounts in this organizational directory only (<your tenant name> - Single Tenant)
  2. App Type: Web
  3. Redirect URI: https://localhost:3000

Step 7: Click on Register


Step 8: [Optional] In the app details page, click on Branding & Properties tab to customize your app.

  1. Logo: Please use the image below for the logo
  2. Home page URL: https://anchormydata.com/
  3. Terms of service URL: https://anchormydata.com/ssa
  4. Privacy Statement URL: https://anchormydata.com/privacy-policy
  5. Click on Save

Step 9: Create a secret key

  1. Click on Certificates & Secrets from the app details page
  2. Click on Client secrets and select New client secret

c. Give a name to the secret. We recommended the name: sharepoint_integration. Select Expiry date as 12 months and then click Add

d. Copy the secret value to add it to the Anchor admin portal later. Note: Please do not share the secret with anyone except Anchor.

Step 10: In the app details page, click on Manifest from the left menu items.

Step 11: Paste the following JSON into addIns section (highlighted in the screenshot) in the manifest. Click on Save.

{
			"id": "76724c1c-90f2-44d1-af08-37166e0223c0",
			"type": "FileHandler",
			"properties": [
				{
					"key": "version",
					"value": "2"
				},
				{
					"key": "actions",
					"value": "[{\"type\":\"newFile\",\"url\":\"https://onedrive.datanchor.io/handler/v1/file/open\",\"availableOn\":{\"file\":{\"extensions\":[\"*\"]},\"web\":{}}},{\"type\":\"open\",\"url\":\"https://onedrive.datanchor.io/handler/v1/file/open\",\"icon\":{\"png1x\":\"https://i.ibb.co/ZgmSjrg/1600185279585.jpg\"},\"availableOn\":{\"file\":{\"extensions\":[\"*\"]},\"web\":{}}},{\"type\":\"preview\",\"url\":\"https://onedrive.datanchor.io/handler/v1/file/open\",\"availableOn\":{\"file\":{\"extensions\":[\"*\"]},\"web\":{}}},{\"type\":\"custom\",\"url\":\"https://onedrive.datanchor.io/handler/v1/file/open\",\"displayName\":\"Open with Anchor\",\"shortDisplayName\":\"Open\",\"icon\":{\"png1x\":\"https://i.ibb.co/ZgmSjrg/1600185279585.jpg\"},\"availableOn\":{\"file\":{\"extensions\":[\"*\"]},\"web\":{}}},{\"type\":\"custom\",\"url\":\"https://onedrive.datanchor.io/handler/v1/file/share\",\"displayName\":\"Share with Anchor\",\"shortDisplayName\":\" Share\",\"icon\":{\"png1x\":\"https://i.ibb.co/ZgmSjrg/1600185279585.jpg\"},\"availableOn\":{\"file\":{\"extensions\":[\"*\"]},\"folder\":{},\"allowMultiSelect\":false,\"web\":{}}},{\"type\":\"custom\",\"url\":\"https://onedrive.datanchor.io/handler/v1/files/anchor/setup\",\"displayName\":\"Add To Auto Encryption\",\"shortDisplayName\":\"Auto Encryption\",\"icon\":{\"png1x\":\"https://i.ibb.co/ZgmSjrg/1600185279585.jpg\"},\"availableOn\":{\"folder\":{},\"allowMultiSelect\":false,\"web\":{}}},{\"type\":\"custom\",\"url\":\"https://onedrive.datanchor.io/handler/v1/files/anchor\",\"displayName\":\"Anchor my Data\",\"shortDisplayName\":\"Anchor\",\"icon\":{\"png1x\":\"https://i.ibb.co/ZgmSjrg/1600185279585.jpg\"},\"availableOn\":{\"file\":{\"extensions\":[\"*\"]},\"allowMultiSelect\":true,\"web\":{}}},{\"type\":\"custom\",\"url\":\"https://onedrive.datanchor.io/handler/v1/files/unanchor\",\"displayName\":\"unAnchor my Data\",\"shortDisplayName\":\"unAnchor\",\"icon\":{\"png1x\":\"https://i.ibb.co/ZgmSjrg/1600185279585.jpg\"},\"availableOn\":{\"file\":{\"extensions\":[\"*\"]},\"allowMultiSelect\":true,\"web\":{}}},{\"type\":\"custom\",\"url\":\"https://onedrive.datanchor.io/handler/v1/files/logs\",\"displayName\":\"Show File Access Logs\",\"shortDisplayName\":\"Show Logs\",\"icon\":{\"png1x\":\"https://i.ibb.co/ZgmSjrg/1600185279585.jpg\"},\"availableOn\":{\"file\":{\"extensions\":[\"*\"]},\"allowMultiSelect\":true,\"web\":{}}}]"
				}
			]
		}

Step 12: In the app details page, click on API Permissions from the left menu items.

  1. Anchor requires API permissions to access Microsoft Graph APIs and SharePoint files, permissions etc.

Please provide the following API permissions

Microsoft Graph:

Permission Type: Application

  1. Application.ReadWrite.All
  2. Sites.Manage.All
  3. Sites.Selected

Permission Type: Delegated

  1. Directory.AccessAsUser.All
  2. Directory.ReadWrite.All
  3. Files.Read
  4. Files.Read.All
  5. Files.ReadWrite
  6. Files.ReadWrite.All
  7. Group.Read.All
  8. Sites.Read.All
  9. Sites.ReadWrite.All
  10. Sites.Manage.All
  11. Sites.Selected
  12. User.Read
  13. Notes.ReadWrite.All
  14. offline_access
  15. openid

SharePoint:

Permission Type: Application

  1. Sites.FullControl.All
  2. Sites.ReadWrite.All
  3. Sites.Selected
  4. User.Read.All
  5. User.ReadWrite.All

Permission Type: Delegated

  1. AllSites.FullControl
  2. AllSites.Manage
  3. AllSites.Read
  4. AllSites.Write
  5. MyFiles.Read
  6. MyFiles.Write
  7. Sites.Search.All
  8. User.Read.All
  9. User.ReadWrite.All


Step 13: After adding the API permissions please click on Grant admin consent for Anchor

Step 14: For the App to be visible in SharePoint following Steps has to be performed

a. Go to Azure Active Directory

b. Click on Enterprise applications

c. Select your App from the list

d. Click on Properties


e. Enable Visible to users? by clicking the switch


Step 15: The app is now setup. Please see https://docs.anchormydata.com/v1/docs/onedrivesharepoint-settings-in-the-admin-dashboard for the next steps.




Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.