October 12, 2026

Salesforce SharePoint integration links your CRM records to the documents your teams keep in SharePoint. With the Microsoft Graph API, each Salesforce record can have its own SharePoint folder, created and filled from Salesforce. Users open the right contract or proposal from the record page. The files stay in SharePoint. A Graph-based build lets you:
Picture an account manager who just closed a large deal. The signed contract, the pricing sheet, and the onboarding plan all live in SharePoint. Before the integration, she hunted through shared folders and pasted links into Salesforce notes. Now a folder named after the opportunity appears as soon as someone creates the deal. Every file is one click away on the record.
This guide shows how the Microsoft Graph API connects Salesforce records with SharePoint. It also covers secure sign-in and the limits to plan for. If you'd rather have experts build it, our Salesforce integration services team can design and deliver it with you.
Microsoft Graph is Microsoft's single API for Microsoft 365 data, including SharePoint Online, OneDrive, Outlook, and Teams. All calls go through one address: graph.microsoft.com. In a Microsoft Graph API Salesforce integration, Salesforce calls Graph to read, create, and update SharePoint files and folders.
Here's the basic idea. Salesforce holds the customer record. SharePoint holds the documents. Graph is the bridge that lets Salesforce ask SharePoint to make a folder, store a file, or list what's inside.
That makes it a strong fit for SharePoint Online Salesforce integration projects that need more than read-only links. With Graph, you control:
Microsoft also offers an older SharePoint REST API. Graph is Microsoft's newer, unified option. It also covers other Microsoft 365 services. The same connection can later grow into a wider Salesforce Microsoft 365 integration with Outlook or Teams. For most new SharePoint REST API Salesforce builds, Graph is the simpler place to start.
There's more than one way to integrate SharePoint with Salesforce. The right choice depends on how much control and automation you need. Salesforce Ben's guide to connecting Salesforce and SharePoint groups the options similarly.
If you're starting small, Files Connect, the built-in Salesforce external file integration, may be enough. Our guide to setting up Salesforce Files Connect for SharePoint walks through it. For a look at ready-made apps, see our list of the best tools to integrate Salesforce files with SharePoint.
A custom Graph build makes sense when your process doesn't fit a packaged app. Think custom objects, special folder rules, or files with strict retention plans. For Salesforce document automation, it's also the most flexible SharePoint Salesforce integration. For example, it can create folders when a deal reaches a new stage.
The heart of a Graph-based design is a clear link between each Salesforce record and one SharePoint location. Most teams use a folder-per-record pattern.
When a user creates an account, opportunity, or case, Salesforce asks Graph to create a matching folder. Graph returns a unique ID for that folder, called a driveItem ID. Salesforce saves this ID in a custom field on the record.
From then on, Salesforce never has to search for the folder by name. It uses the saved ID, which keeps working even if someone renames the folder in SharePoint.
Keep the structure predictable so both systems stay easy to manage:
Adding the Salesforce ID to the folder name prevents clashes when two records share a name. It also helps admins find the right folder during support checks.
A Lightning web component on the record page lists the files in the linked folder. Users get Salesforce SharePoint file access without leaving the record. They can open, upload, or download files in one place. This turns Salesforce records with SharePoint into a single workspace for sales, service, and finance teams.
Here's the high-level flow for a Microsoft Graph API SharePoint build. Exact screens change over time, so follow the latest Microsoft and Salesforce docs for each click.
Test the whole flow in a Salesforce sandbox and a test SharePoint site before you go live.
Authentication is where many Microsoft Graph API integration projects go wrong, so plan it early.
For background jobs, such as creating folders when users save records, most teams use the OAuth 2.0 client credentials flow. Salesforce signs in as the app itself, not as a person. For actions where SharePoint must check each user's own rights, a per-user sign-in flow fits better.
On the Salesforce side, use named credentials for every Graph callout. The Salesforce Developers guide to named credentials for Apex callouts explains why. Salesforce handles the sign-in, so secrets never appear in your code. Salesforce Codex also covers how to work with external credential parameters in Apex if your team needs custom settings.
For permissions, Microsoft offers a scope called Sites.Selected. It gives the app access only to the SharePoint sites you choose, instead of every site in your tenant. An admin first consents to the scope. Then the admin assigns the app a read or write role on each chosen site. This is the safest default for a Salesforce OAuth integration with SharePoint.
Creating folders and uploading files covers the Salesforce-to-SharePoint direction. A full Salesforce SharePoint document sync also brings SharePoint changes back.
Graph offers a delta query for document libraries. The first call returns every item and a saved link, called a deltaLink. Later calls with that link return only what changed since the last check, including new, edited, and deleted files.
A scheduled Apex job can call the deltaLink every few minutes. It then updates Salesforce, such as a file count on the record or a "last document added" date. Microsoft notes that delta is the most reliable way to read every change in a library.
Graph can also send change notifications when a library changes. Salesforce receives the alert, then runs a delta call to get the details. This cuts down on constant polling and keeps SharePoint file synchronization close to real time.
Graph supports simple uploads for files up to 250 MB. Microsoft recommends upload sessions for anything over 10 MiB. An upload session sends the file in parts, called fragments, and can resume if the connection drops.
Each fragment must be smaller than 60 MiB and a multiple of 320 KiB. Microsoft suggests 5 to 10 MiB per fragment. This matters for Salesforce, because Apex has its own size limits, covered in the next section.
Good Salesforce file management starts with knowing the limits on both sides. Like any Salesforce API integration, a Graph build has to work within them. These numbers come from Salesforce and Microsoft documentation.
The key takeaway is simple. Apex works well for folders, metadata, and small files. For large files, many teams have the browser upload straight to the Graph upload session URL. That keeps big files out of Apex entirely.
If you're new to Apex callouts, Trailhead's Apex Integration Services module is a good primer for your developers.
Throttling also deserves a plan. When Graph returns HTTP 429, your code should wait for the time in the Retry-After header and try again. Delta queries and change notifications also help you avoid throttling.
A Graph build gives you full control. These habits keep your CRM document management clean over time.
Use the narrowest permissions. Start with the Sites.Selected scope, limited to the sites Salesforce needs. Avoid tenant-wide scopes unless there's a clear reason.
Save IDs, not paths. Store the SharePoint folder ID on each Salesforce record. IDs keep working when people rename or move folders.
Plan secret rotation. Client secrets expire. Set a reminder to rotate them, or use certificates for longer-lived access.
Log every callout. Write errors to a custom log object in Salesforce. Your admins can then spot failed uploads before users report them.
Keep SharePoint as the file owner. Let SharePoint document management handle versions, retention, and sharing. Salesforce shows and links the files rather than storing copies, which keeps Salesforce document storage low.
Respect user access. If some documents are sensitive, use a per-user sign-in for viewing. That way, Salesforce file sharing follows each person's SharePoint rights.
Start with one object. Launch with accounts or opportunities first. Add cases, custom objects, and sync once the first flow runs cleanly.
A well-run CRM and SharePoint integration also supports enterprise document management goals, such as audit trails and retention rules. For the bigger business picture, read our post on why Salesforce SharePoint integration matters for enterprise growth. Our step-by-step Salesforce SharePoint integration guide also covers common pitfalls.
Our team has built document integrations on Salesforce before, including DocuSign integration for document generation and SpringCM for contract storage. The same principles apply to SharePoint: clear ownership, secure access, and files tied to the right record.
Salesforce SharePoint integration connects Salesforce records to documents stored in SharePoint. Users can open, upload, and manage SharePoint files from inside Salesforce. Files stay in SharePoint, which saves Salesforce storage and keeps one source of truth.
Salesforce sends secure calls to Microsoft Graph, Microsoft's API for Microsoft 365 data. Graph then creates folders, uploads files, or lists documents in SharePoint. Salesforce stores the returned folder ID on each record to keep them linked.
Yes. Salesforce Files Connect and several AppExchange apps offer no-code options. A custom Graph build needs developers but gives you full control over folders, sync, and security.
For most new builds, yes. Graph is Microsoft's unified API and works across SharePoint, OneDrive, Outlook, and Teams. The SharePoint REST API still works, but Graph keeps your integration ready for other Microsoft 365 needs.
It depends on what the build does. Sites.Selected is the safest choice for app-only access, since it limits Salesforce to the sites you pick. An admin must grant consent and assign a read or write role on each site.
Yes. Salesforce can create folders and upload files through Graph. To bring SharePoint changes back, use Graph delta queries, often paired with change notifications.
With Graph, Salesforce SharePoint integration gives every record a home for its files. Folders appear automatically, files upload from the record page, and changes flow back. Your teams spend their time with customers, not in shared drives.
Minuscule Technologies has built on Salesforce since 2014. Our team has 125+ certified Salesforce experts and 75+ projects worldwide. Do your lenders keep loan files in SharePoint? Our Loan Lifecycle Visibility accelerator tracks each loan from start to payout in Salesforce. Our Industry Starter Packs also give your team a ready-made base to build on.
Ready to link your Salesforce records with SharePoint? Book a Salesforce SharePoint integration consultation with our team. We'll review your document process, design the right Graph setup, and plan a secure rollout.
You've seen what's possible. Now, let's make it happen for your business. Whether you need an end-to-end Salesforce solution, a complex integration, or ongoing managed services, our team is ready to deliver.
Schedule a Free Strategic Call