How to Copy a Salesforce PDF to SharePoint Using Microsoft Graph
Question details
The user needs to programmatically copy PDF documents from Salesforce cases to a SharePoint Online document library using secure API methods.

- Product
- SharePoint Online / Microsoft Graph
- Device & OS
- not provided
- Scenario
- Automating secure document transfer between a Salesforce environment and a SharePoint Online document library.
- Observed behavior
- Requires establishing a secure application connection to Microsoft Graph for file upload, as basic authentication is deprecated and not recommended.
Ensure you have Azure Active Directory administrator access to register your application, configure OAuth 2.0 authentication, and generate the necessary secure client credentials.
Consult Microsoft Q&A and Graph Support
Because custom API integration requires specific authentication flows and coding, consulting Microsoft Graph experts is highly recommended for implementation details.
Microsoft Graph API integrations involve complex token exchanges and endpoint routing. If you encounter errors during implementation, Microsoft provides dedicated developer channels.
Navigate to the Microsoft Q&A developer portal and initiate a new question thread.
Apply the 'Microsoft Graph' tag to ensure your query reaches the appropriate engineering community and support staff.
Include your intended authentication flow, SharePoint site and library details, and the Graph upload endpoint you plan to use.
Ensure that you do not include passwords, client secrets, tenant IDs, or other sensitive credentials in your public post.

Standard Microsoft Graph API Upload Workflow
Understand the high-level steps required to authenticate and upload a document to SharePoint via Microsoft Graph.
Manage and Edit PDF Documents Seamlessly with WPS Office
While custom API integrations require Microsoft developer tools, everyday document management, editing, and PDF conversions can be easily handled with WPS Office. It provides a lightweight, comprehensive, and highly compatible alternative to Microsoft Office.
- 1. Download the installer: Visit the official WPS website and click the Free Download button.
- 2. Install the application: Run the downloaded setup file and follow the on-screen instructions to complete the installation.
- 3. Open and edit PDFs: Launch WPS Office, open your PDF documents, and utilize the built-in PDF tools for seamless editing.

Frequently Asked Questions
Why is basic authentication not recommended for Microsoft Graph?
Basic authentication is less secure as it sends credentials in easily decodable base64 strings and doesn't natively support multi-factor authentication (MFA). Microsoft requires modern authentication (OAuth 2.0) for Graph API to ensure robust data security.
What is the file size limit for uploading to SharePoint via the standard Graph API PUT method?
For a simple PUT request, the file size limit is 4 MB. For PDF files larger than 4 MB, you must create an upload session and upload the file in chunks using the Microsoft Graph API.
Can I transfer files from Salesforce to SharePoint without writing custom API code?
Yes, you can use integration platforms like Power Automate, Zapier, or MuleSoft. These services offer pre-built connectors for both Salesforce and SharePoint, allowing you to automate file transfers visually without configuring custom OAuth flows or Graph API endpoints.




