/
Sharepoint Integration - Connection Guide (OneDrive)

Sharepoint Integration - Connection Guide (OneDrive)

The SharePoint Integration connects Salesforce to OneDrive (backed by SharePoint Online) for file storage and organization. Each Animal and Job record in Salesforce is automatically linked to a dedicated folder in OneDrive, created as soon as a file is uploaded. This integration helps business SMEs keep track of important documents for each Animal and Job record, without needing to navigate separate storage systems.

This guide steps a technical team through integrating Salesforce with OneDrive (via SharePoint Online) by setting up authentication, API permissions, and secure file storage. This ensures that each Animal and Job record in Salesforce is linked to a dedicated OneDrive folder, with access controlled by Salesforce permissions.

Note these integration steps are subject to change depending on Microsoft & Salesforce updates & releases.

Steps Integration Connection Steps

  1. Accessing the Azure Portal

    1. To get started, log in to your organisations Azure Portal.

    2. Once logged in, navigate to the Home Page and select Azure Active Directory.

  1. Registering a New Application

    1. In Azure Active Directory, go to App Registrations.

    2. Click on New Registration to create a new app.

  1. Configuring Application Settings

    1. In the new window, enter a name for your application.

    2. Select Accounts in any organizational directory or Accounts in any organizational directory and personal Microsoft accounts, such as Skype, Xbox, and Outlook if a multi-tenant application is required).

  1. Generating a Client Secret

    1. After registering, navigate to Certificates & Secrets.

    2. Create a new Client Secret and save the generated key securely.

  1. Copying Required Credentials

    1. Under the Overview tab, copy the Client ID.

    2. Keep both the Client ID and the Client Secret on hand, as they will be needed for Salesforce configuration.

  1. Configuring Authentication in Salesforce

    1. Log in to your Salesforce Org.

    2. Navigate to Setup Identity Auth Providers and enter the copied credentials:

      1. Consumer KeyClient ID

      2. Consumer SecretGenerated Client Secret

    3. Set the following endpoints:

      1. Token Endpoint URL: https://login.microsoftonline.com/common/oauth2/v2.0/token

      2. Default Scopes: files.readwrite offline_access

      3. Click Save

  1. Adding a Callback URL in Azure

    1. In the Azure Portal, open the Overview tab for your app.

    2. Add the Salesforce Callback URL and Logout Endpoint.

  1. Assigning API Permissions

    1. In the Azure Portal, navigate to API Permissions for your app.

    2. Under Microsoft Graph, add the required permissions:

      1. Delegated Permissions: offline_access

      2. Directory Permissions: Directory.AccessToUser.All, Directory.Read.All, Directory.ReadWrite.All

      3. Files Permissions: Files.Read, Files.Read.All, Files.Read.Selected, Files.ReadWrite, Files.ReadWrite.All, Files.ReadWrite.AppFolder, Files.ReadWrite.Selected

      4. User Permissions: User.ReadBasic.All, User.Read, User.Read.All, User.ReadWrite, User.ReadWrite.All

      5. Sites Permissions: Sites.Read.All, Sites.ReadWrite.All

  1. Configuring Named Credentials in Salesforce

    1. In Salesforce Setup, go to Named Credentials.

    2. Set the following values:

      1. URL: https://graph.microsoft.com/v1.0

      2. Scope: files.readwrite offline_access

      3. Authentication Provider: Use the one created in the previous step.

 

  1. Installing Required Salesforce Packages

    1. Install the Vertic Common Package.

    2. Deploy the following Lightning Components:

      1. OneDriveFileDeleteConfirmation

      2. OneDriveFileDownload

      3. OneDriveFileItem

      4. OneDriveFiles

      5. OneDriveFileView

    3. Deploy the following Apex Class:

      1. vertic_HttpRequestProc

 

  1. Configuring Salesforce Domains

    1. In Salesforce click Setup, navigate to Comany Settings My Domain.

    2. Enter a unique subdomain if required (e.g. yourcompanyname.my.salesforce.com) and click check availability.

    3. If available, click Register Domain and wait for Salesforce to process it.

    4. Once the domain is ready, log in using the new domain and verify that Salesforce is functioning correctly.

  • This step ensures a stable OAuth Callback URL for Microsoft Azure authentication which is required for the SharePoint/OneDrive integration.

  • It also allows Named Credentials in Salesforce to reference a fixed URL rather than login.salesforce.com.

 

  1. Adding OneDrive Integration to a Salesforce Object

    1. Select a Salesforce Record.

    2. Click the Settings iconEdit Page.

    3. Under Tabs, click Add Tab → Select Custom and give it a name.

    4. Drag the OneDrive Component onto the new tab.

    5. Click Save, then Activate.

  1. Adding a Remote Site in Salesforce

    1. Open OneDrive from the Office site and copy the URL (from http to the first /).

      1. Example: https://yourcompanyname-my.sharepoint.com/

    2. In Salesforce click the Setup menu and, go to Remote Site Settings.

    3. Add a New Remote Site and insert the copied URL.

 

  1. Integration Complete

You have now successfully completed the Salesforce and SharePoint (OneDrive) integration. Your AnimalOS installation is now connected to OneDrive, allowing files to be stored and managed seamlessly.

To verify the setup, try uploading a file to an Animal record in Salesforce—a corresponding folder should be automatically created in OneDrive (SharePoint Online). 🚀

Related content

Sharepoint Integration - File Management Guide
Sharepoint Integration - File Management Guide
More like this
Document Management - OneDrive Integration
Document Management - OneDrive Integration
More like this
OneDrive Integration
OneDrive Integration
More like this
Partner Portal
More like this
Animal Files
More like this
PetRescue Integration
PetRescue Integration
More like this