Integrating Salesforce with Microsoft SharePoint Using File Connect
The perfect match of the best CRM (Salesforce) and a feature-stuffed Microsoft-powered document management system SharePoint
Integrating Salesforce with Microsoft SharePoint Using File ConnectPlease note that this is a point-and-click solution using the standard File Connect feature in Salesforce and requires no code in writing. SharePoint App details, Mircosoft 0365 Org. Details and Salesforce URLs would change for everyone building this solution. Details mentioned in this document are for reference purposes only.
Making SharePoint Site Ready (Microsoft o365 Account is needed)
Create a Microsoft SharePoint trial account in the case already does not exist (Developer trial). This would help you get access to MS o365 Trial for 90 days including SharePoint access.
Go to Salesforce Setup > Auth Providers and create a new record with Provider Type = Microsoft Access Control Services. It supports a lot of provider types including Google, Apple, Facebook, Twitter, Slack, LinkedIn, and so on.
Enter the Name and URLSuffix, and for the time being, enter a dummy value for Consumer Key, Consumer Secret, Authorize Endpoint URL, and Token Endpoint URL (you may have to include HTTP:// for getting the URL fake values right.
Later these details to be confirmed and taken from the SharePoint App which we would create in the upcoming steps. Final Details are updated in the screenshot for time saving.
Creating New Auth. Provider in Salesforce
Complete details should look like as below:
Sample Auth. Provider Details, Details would vary as per the org.
Where
In the field of Authorize Endpoint URL, you would have to enter the value https://[your company name].sharepoint.com/[site collection path]/_layouts/15/OauthAuthorize.aspx
In the field of Token Endpoint URL, enter the value https://accounts.accesscontrol.windows.net/[your company name].onmicrosoft.com/tokens/OAuth/2?resource=00000003–0000–0ff1-ce00–000000000000/[your company name].sharepoint.com@[your company name].onmicrosoft.com
where [your company name] = 6kn6y3 in our case. This will vary in every case as per the SharePoint account details.
Create SharePoint App for Salesforce integration
This SharePoint App details would be needed to re-configure the Auth. Provider in earlier steps once our App is ready and configured.
We can create a new SharePoint App by appending _layouts/15/appregnew.aspx at the end of the SharePoint Site Collection URL [sites/fileconnectwithsp]
URL Format : https://[your company name].SharePoint.com/[site collection path]/_layouts/15/appregnew.aspx
Auth. Provider set-up would be done in the next few steps.
Configuring SharePoint App for Salesforce integration
We need to configure our newly created SharePoint App for the necessary level for Access grants, by appending _layouts/15/appinv.aspx at the end of the SharePoint Site Collection URL [sites/fileconnectwithsp]
Complete URL format: https://[your company name].SharePoint.com/[site collection path]/_layouts/15/appinv.aspx
App Id is the Client Id for the newly created App above. Search with App Id = Client Id and click Lookup. It will search and Load the App created in the previous step.
This will auto-populate the values of other boxes except for Permission Request XML. The value of Permission Request XML, as the title suggests, defines the level of access the connecting application will have in respect to accessing SharePoint files collections. The standard input is as below:
FullControl
For details about the differences between permission levels above, see the Microsoft website.
Configuring External Data Sources, using the Auth. Provider created above
Within Salesforce, create a new external data source with the below details, using the Auth. Provider created in the earlier steps.
For the new External Data Source, select Type = File Connect: Microsoft SharePoint Online
Creating new External Data Source
New External Data Source Details once ready: →
Configuring external data source using newly created Auth. Provider
2. At the end once setup, click Validate and Sync in order to Sync the data/tables from the external system (SharePoint in our case)
3. Once Sync Status = COMPLETE, a new Table gets inserted and a new External Object got created items_SharePointFileConnect
4. Sometimes, errors might come while Validate and Sync, just wait or refresh the page to get the latest status until Status = COMPLETE
5. External Data Source page layout can be adjusted to show the required fields as needed by the business, under Set up > External Objects > Page layout > Edit
New External Data Source details
User Permission Sets Creation for Files Connect access
Now we need to add newly created Custom Object (External) and External Data Source to the already created permission set: FilesConnect Permission Set in one of the earlier steps
Add below access to this permission set record:
Add below permissions : and assign to respective users who need SharePoint access from Salesforce. In this case, assign to your user.
New permissions details
Validating if Salesforce can access the SharePoint Files
Salesforce Lightning > go to Files tab, you should be able to see a New Connected Source which is created above
Newly created File Connect Source: Image 1
Newly created File Connect Source: Image 2
2. Salesforce classic: Go to any object (let’s say Opportunity) > Under Files > Select a File from Salesforce > Click
Salesforce Classic — Select a File from Salesforce
4. Select any file and it gets attached to the Salesforce Opportunity record.
SharePoint file connected to Salesforce Opportunity record! Success 🙂
Troubleshooting
If you see errors like ‘You are not authorized to perform that operation in Files Connect Office 365 It means SharePoint App was not provided proper level of access using SCOPE and RIGHT properties.
Senior Professional - Application Delivery (Salesforce): A 4x Certified Salesforce Consultant with more than 12 years of experience in Salesforce & Oracle Siebel CRM.
The Salesforce CLI is not just a tool; it’s the cornerstone of development on the Salesforce Platform. It’s your go-to for building, testing, deploying, and more. As one of the most important development tools in our ecosystem
Table of Contents
What is Apex Log Analyzer?
Apex Log Analyzer, a tool designed with Salesforce developers in mind, is here to simplify and accelerate your...
Introduction
Hey Everyone,
Welcome to my podcast, the first-ever podcast in India for Salesforce professionals.
Achievement
We are happy to announce that we have been selected as Top...
I want to learn new things…
Please go ahead. Anything stopping you?