This is the era of cloud. Everything everywhere is connected with each other via cloud hosted web services and people can access these services from anywhere in globe, anytime. Such are the powers of cloud. But is everything really connected as is expected?
Not every cloud based service can be connected with every other service, but fortunately most popular Apps can be integrated. And so can Salesforce and Microsoft SharePoint be integrated – two of the most popular Software-as-a-Service (SaaS) products.
However it is not that simple. In this post we are going to discuss different ways by which you can integrate Salesforce with SharePoint. But first let us identify why would you even need to integrate the two?
SharePoint is a very robust content management and document management platform used by all kinds of companies, mainly for storing business related documents and content. It is mostly used as a secure document repository for intranet portals, websites, cloud based services, and of course as independent repository as well. However it is mostly used by businesses using other Microsoft Office products like Excel and Word to create documents. Now since they belong to the same product family, the created documents can be easily exported to SharePoint.
Salesforce on the other hand is a huge SaaS platform used by millions of companies to manage their business processes. It mainly started as a Customer Relationship Management Platform but thanks to its versatility regarding integrations and extensions along with a boost in its ever-growing list of features, it has evolved into a complete sales, marketing and support business process management platform and can be used for many many kind of analysis for businesses.
However it was never known for its document storage capabilities. You can store documents there but it charges quite high fees for storage and is not as robust as Microsoft 365 in this aspect.
So why not simply integrate the two? Most companies having a Microsoft 365 account don’t want to spend more on Salesforce storage. So integration remains the best option.
Salesforce SharePoint Integration Using Microsoft Azure Service
There are a number of ways you can integrate SharePoint with Salesforce. However Microsoft has not released any API to facilitate direct Salesforce SharePoint interactions so we need to involve a third-party adapter or service. The different ways are:
Integrating using a third party system installed adapter
Integrating using a Microsoft Azure hosted service.
Integrating using a third party integration service.
The first way involves building a third-party adapter that had to be physically installed on a computer system and therefore severely limits the cloud based capabilities. The third way involves using a paid or even free integration service, it is easy to use but it is not as flexible as a custom adapter and may prove to be a security risk. Moreover the main point of integration was to save cost so paying to save cost needs to properly analyzed.
So the best cloud integration method left is to use a Microsoft Azure hosted service to integrate your Salesforce and SharePoint.
This method involves multiple steps
Step 1: Salesforce sends authentication request to the Adapter.
Step 2: The Adapter passes on the request to the SharePoint.
Step 3: SharePoint authenticates the information and passes on a security token for further use.
Step 4: The adapter receives the token and passes on the token to Salesforce.
Step 5: Using the token as an authentication key, Salesforce then send request to view specific or all accessible files and folders.
Step 6: The Adapter passes on the request along with the token and receives an output which it again passes on to the Salesforce installation.
Step 7: Either the token expires and the process is repeated again, or using the same token more requests are sent and received.
It seems simple when I present the steps like this but in reality if the coder is experienced and careful it’s just as simple.
How Salesforce Performs Step 1 The main point for cloud based integration is to host a running service on Microsoft’s cloud app platform Azure, and leveraging it to interact with SharePoint. Since the service is hosted on a cloud platform, we usually access it via web-based URL. So our methods from Salesforce side to request authentication token look something like this:
return'SharePoint Server Error: Status '+ httpResponse.getStatus()+' Status Code '+ httpResponse.getStatusCode() +' Body '+httpResponse.getBody();
32
}
33
}catch(CalloutException ce){
34
throwce;
35
}catch(Exception ex){
36
throwex;
37
}
38
returnnull;
39
}
This code hits the Azure service using the URL and receives the authentication token which the Azure service sends.
We will come to the steps 2,3 and 4 right after the 5th:
How Salesforce Performs Step 5 Once Salesforce has authentication token, it uses that to request files and folders from the adapter. Once again it uses the Azure service URL to hit the service.
Here’s a method to request files and a method to request folders
How Azure Performs Step 2, 3, and 4 Once Salesforce has sent the request for authentication token, here’s how Azure platform service authenticates login.
How Azure service handles Step 6 Now that Salesforce has authentication token and is logged in on SharePoint, here’s how our Azure service parses the request for file and folder lists.
As you may see, we have saved all our content on SharePoint as resources and the service retrieves the data from that resource folder.
How To Display SharePoint Files
Now the integration won’t be as effective if we are not able to display the retrieved files somewhere. In our experience it is best to retrieve files using Salesforce and create a separate Visualforce page to display the retrieved files. Using SharePoint’s inbuilt features it is very easy to display retrieved files. You just have to embed a single line of code in your Visualforce page.
Salesforce and Microsoft, in an obvious strategy of mutual benefit went into an extended partnership. On December 17 Salesforce launched its new features via Salesforce Files Connect. It was released after much research and is touted as a method to integrate Microsoft 365 products as well as Microsoft OneDrive. For CRM license holders this service is available for free in limited capacity of course, and can be used to integrate Salesforce with SharePoint directly. But since it’s a new service it’s still not tested for the most optimum performance and security standards by third party users. We here at Algoworks have an immense experience with such third party service integration services- both system based and Azure service based. We can safely assume that in the near future Files Connect would be the dominant way to integrate both SaaS platforms.