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
Accessing the Azure Portal
To get started, log in to your organisations Azure Portal.
Once logged in, navigate to the
Home Page
and selectAzure Active Directory
.
Registering a New Application
In Azure Active Directory, go to
App Registrations
.Click on
New Registration
to create a new app.
Configuring Application Settings
In the new window, enter a name for your application.
Select
Accounts in any organizational directory
orAccounts in any organizational directory and personal Microsoft accounts, such as Skype, Xbox, and Outlook
if a multi-tenant application is required).
Generating a Client Secret
After registering, navigate to
Certificates & Secrets
.Create a new
Client Secret
and save the generated key securely.
Copying Required Credentials
Under the
Overview
tab, copy theClient ID
.Keep both the
Client ID
and theClient Secret
on hand, as they will be needed for Salesforce configuration.
Configuring Authentication in Salesforce
Log in to your Salesforce Org.
Navigate to
Setup
→Identity
→Auth Providers
and enter the copied credentials:Consumer Key
→Client ID
Consumer Secret
→Generated Client Secret
Set the following endpoints:
Token Endpoint URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token
Default Scopes:
files.readwrite offline_access
Click
Save
Adding a Callback URL in Azure
In the
Azure Portal
, open theOverview
tab for your app.Add the
Salesforce Callback URL
andLogout Endpoint
.
Assigning API Permissions
In the
Azure Portal
, navigate toAPI Permissions
for your app.Under
Microsoft Graph
, add the required permissions:Delegated Permissions:
offline_access
Directory Permissions:
Directory.AccessToUser.All
,Directory.Read.All
,Directory.ReadWrite.All
Files Permissions:
Files.Read
,Files.Read.All
,Files.Read.Selected
,Files.ReadWrite
,Files.ReadWrite.All
,Files.ReadWrite.AppFolder
,Files.ReadWrite.Selected
User Permissions:
User.ReadBasic.All
,User.Read
,User.Read.All
,User.ReadWrite
,User.ReadWrite.All
Sites Permissions:
Sites.Read.All
,Sites.ReadWrite.All
Configuring Named Credentials in Salesforce
In
Salesforce Setup
, go toNamed Credentials
.Set the following values:
URL:
https://graph.microsoft.com/v1.0
Scope:
files.readwrite offline_access
Authentication Provider: Use the one created in the previous step.
Installing Required Salesforce Packages
Install the
Vertic Common Package
.Deploy the following
Lightning Components
:OneDriveFileDeleteConfirmation
OneDriveFileDownload
OneDriveFileItem
OneDriveFiles
OneDriveFileView
Deploy the following
Apex Class
:vertic_HttpRequestProc
Configuring Salesforce Domains
In Salesforce click
Setup
, navigate toComany Settings
→My Domain
.Enter a unique subdomain if required (e.g.
yourcompanyname.my.salesforce.com
) and clickcheck availability
.If available, click
Register Domain
and wait for Salesforce to process it.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 thanlogin.salesforce.com
.
Adding OneDrive Integration to a Salesforce Object
Select a
Salesforce Record
.Click the
Settings icon
→Edit Page
.Under
Tabs
, clickAdd Tab
→ SelectCustom
and give it a name.Drag the
OneDrive Component
onto the new tab.Click
Save
, thenActivate
.
Adding a Remote Site in Salesforce
Open
OneDrive
from the Office site and copy the URL (fromhttp
to the first/
).Example:
https://yourcompanyname-my.sharepoint.com/
In Salesforce click the
Setup menu
and, go toRemote Site Settings
.Add a
New Remote Site
and insert the copied URL.
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). 🚀