How To Achieve Perfect Dynamics 365 Integration With SharePoint Online
Integrating Dynamics 365 with SharePoint Online enables organizations to manage documents directly within CRM records, eliminating the need for email attachments, local file storage, or manual document linking. Server-based integration replaces the legacy client-side approach with a secure, scalable connection that leverages Azure AD authentication and provides seamless document management across sales, service, and custom entities.
Server-Based Integration: The Modern Approach
Microsoft recommends server-based integration as the standard method for connecting Dynamics 365 Customer Engagement (Sales, Service, Marketing) with SharePoint Online. This approach replaces the legacy List Component that required SharePoint-side sandboxed solutions with a cloud-to-cloud integration managed entirely through Dynamics 365 settings.
- Cloud-to-Cloud Authentication - Server-based integration uses Azure AD (Entra ID) for authentication between Dynamics 365 and SharePoint Online. No client-side components, plugins, or custom code are required on the SharePoint side.
- Automatic Folder Creation - When a user navigates to the Documents tab on a Dynamics 365 record (account, contact, opportunity, case), SharePoint automatically creates a folder named after the record in the designated document library.
- Multi-Entity Support - Enable document management for any Dynamics 365 entity: Accounts, Contacts, Opportunities, Cases, Quotes, Orders, custom entities, and more. Each entity maps to a document library or subfolder structure.
- No Storage Consumption - Documents stored in SharePoint do not consume Dynamics 365 database storage (which is significantly more expensive per GB), providing substantial cost savings for document-heavy organizations.
Step-by-Step Configuration Guide
Configuring the Dynamics 365 to SharePoint Online integration involves settings in both the Dynamics 365 admin center and the Power Platform admin center. Follow these steps for a production-ready deployment.
- Step 1: Verify Prerequisites - Ensure your Dynamics 365 environment and SharePoint Online tenant are on the same Azure AD tenant. Both administrators need Global Admin or Dynamics 365 System Administrator plus SharePoint Admin roles.
- Step 2: Create the SharePoint Site - Create a dedicated SharePoint site for Dynamics 365 documents (e.g., https://tenant.sharepoint.com/sites/D365Documents). Use a team site rather than a communication site. Create document libraries for each entity if you want library-level separation.
- Step 3: Enable Server-Based Integration - In the Power Platform admin center, navigate to Environments > [Your Environment] > Settings > Integration > Document management settings. Select "Enable server-based SharePoint integration" and follow the wizard.
- Step 4: Configure Document Management - Run the Document Management Settings wizard to select which entities will have document management enabled. Choose between entity-based folders (all documents in one library organized by folders) or dedicated libraries per entity.
- Step 5: Set Default Site - Specify the default SharePoint site URL that Dynamics 365 will use for automatic folder creation. You can configure multiple sites for different business units or entities.
- Step 6: Validate Integration - Open a Dynamics 365 record (e.g., an Account), click the Documents tab, and verify that SharePoint displays correctly. Upload a test document to confirm read/write functionality.
Folder Structure Best Practices
The folder structure in SharePoint directly impacts usability, performance, and governance. Planning the hierarchy before enabling integration prevents costly restructuring later.
- Entity-Based Libraries - Create separate document libraries for Accounts, Opportunities, Cases, etc. This provides cleaner permission management and avoids the 5,000-item view threshold in a single library.
- Folder Naming Convention - By default, Dynamics 365 names folders using the record name and a GUID suffix (e.g., "Contoso_A1B2C3D4"). Consider customizing the naming convention to include record numbers or other identifiers for easier navigation in SharePoint.
- Metadata Enhancement - Add SharePoint metadata columns (document type, status, review date) to the document libraries. While Dynamics 365 users primarily interact through the CRM interface, SharePoint metadata enables advanced search, views, and retention policies.
- Site Collection Sizing - For organizations with 10,000+ CRM records, consider distributing folders across multiple SharePoint site collections to avoid storage and performance limits. Use URL-based document locations in Dynamics 365 to point records to different sites.
Security and Permissions
The security model for Dynamics 365/SharePoint integration requires careful alignment to ensure users see only the documents they are authorized to access without creating administrative overhead.
- Permission Sync - Server-based integration does not automatically sync Dynamics 365 security roles with SharePoint permissions. By default, all SharePoint site members can see all document folders. For sensitive scenarios, you must configure SharePoint permissions separately.
- SharePoint Security Groups - Create SharePoint security groups that mirror your Dynamics 365 security roles (Sales Team, Support Team, Management). Assign appropriate permissions (Contribute, Read, Full Control) to each group on the relevant document libraries.
- Folder-Level Permissions - For highly sensitive records (legal cases, HR matters), break permission inheritance at the folder level to restrict access to specific users. However, use this sparingly as it adds administrative complexity.
- Sensitivity Labels - Apply Microsoft Purview sensitivity labels to documents uploaded through Dynamics 365 to enforce encryption, access restrictions, and watermarking that persist even when documents are downloaded or shared externally.
- Conditional Access - Apply Azure AD conditional access policies that control document access based on device compliance, user location, and risk signals, protecting CRM documents from unauthorized access on unmanaged devices.
Advanced Integration Scenarios
Beyond basic document management, organizations can extend the Dynamics 365/SharePoint integration to support advanced business scenarios that multiply the value of both platforms.
- Power Automate Document Workflows - Trigger automated workflows when documents are uploaded to CRM-linked SharePoint folders: approval processes for contracts, notification flows for new proposals, automatic document classification using AI Builder.
- OneNote Integration - Link OneNote notebooks to Dynamics 365 records for rich note-taking with images, drawings, and embedded files. Notes sync between Dynamics 365, OneNote, and SharePoint automatically.
- Document Templates - Deploy Word and Excel document templates in Dynamics 365 that auto-populate with CRM data (customer name, opportunity details, pricing) and save directly to the record's SharePoint folder.
- Email to SharePoint - Configure Power Automate flows that automatically save email attachments from Dynamics 365 tracked emails to the corresponding record's SharePoint folder with metadata tagging.
- Power BI Document Analytics - Build Power BI reports that analyze document metadata from SharePoint (document types per opportunity stage, average documents per deal, document age distribution) for process optimization insights.
Why Choose EPC Group for Dynamics 365 and SharePoint Integration
EPC Group has implemented Dynamics 365 and SharePoint integration for hundreds of enterprise organizations over our 28+ years of Microsoft consulting. As a Microsoft Gold Partner, our team brings deep expertise in both CRM and content management platforms, ensuring seamless integration that enhances productivity while maintaining governance and compliance. Our founder, Errin O'Connor, authored 4 Microsoft Press books including the definitive guide on SharePoint architecture.
- End-to-end integration architecture from planning through deployment, testing, and user training
- Advanced document management solutions including metadata-driven organization, approval workflows, and template automation
- Security design that aligns Dynamics 365 security roles with SharePoint permissions without creating administrative overhead
- Compliance-aware implementations for HIPAA, SOC 2, and FedRAMP regulated environments
Need Help Integrating Dynamics 365 with SharePoint?
EPC Group's integration specialists design and implement Dynamics 365/SharePoint solutions that streamline document management, automate workflows, and ensure compliance across your CRM and content management platforms.
Frequently Asked Questions
Do Dynamics 365 and SharePoint need to be on the same tenant?
Yes. Server-based integration requires both Dynamics 365 and SharePoint Online to be on the same Azure AD (Entra ID) tenant. Cross-tenant integration is not supported for the standard document management integration. If your organization has multiple tenants, consider tenant consolidation or use Power Automate with custom connectors for cross-tenant document scenarios.
Does the integration work with Dynamics 365 Finance and Operations?
The server-based SharePoint integration described in this guide applies to Dynamics 365 Customer Engagement apps (Sales, Service, Marketing, Custom apps built on Dataverse). Dynamics 365 Finance and Operations has a separate document management system that also integrates with SharePoint Online, but uses a different configuration approach through the Document Management workspace in F&O.
How do I handle documents for custom entities?
Custom entities in Dynamics 365 can be enabled for document management just like standard entities. Navigate to Settings > Document Management > Document Management Settings, and your custom entities will appear in the entity list. Select them, specify the SharePoint site and folder structure, and the Documents tab will appear on custom entity forms. Create a dedicated document library in SharePoint for each custom entity to maintain clean organization.
What happens to documents when a Dynamics 365 record is deleted?
When a Dynamics 365 record is deleted, the corresponding SharePoint folder and its documents are NOT automatically deleted. The folder remains in SharePoint and is accessible through normal SharePoint navigation. This is by design for data retention and compliance purposes. If you need automatic cleanup, build a Power Automate flow that triggers on record deletion and removes or archives the corresponding SharePoint folder. For regulated environments, retain the documents according to your retention policy regardless of CRM record status.
Can I use SharePoint document libraries with custom metadata in Dynamics 365?
Yes, with limitations. SharePoint metadata columns are visible in the document management experience within Dynamics 365, but users cannot edit SharePoint metadata columns directly from the Dynamics 365 interface. They must click "Open Location" to access the full SharePoint document library for metadata editing. For organizations that require metadata tagging, consider using Power Automate to automatically populate SharePoint metadata columns based on Dynamics 365 record data when documents are uploaded.
Related Resources
Continue exploring dynamics 365 insights and services
