15.2 SharePoint & OneDrive Document Management Integration
Key Takeaways
- Server-based SharePoint Integration enables native, server-to-server (S2S) document management inside Dataverse model-driven apps, eliminating client-side ActiveX components and sandbox cookie dependencies.
- The Dataverse Document Management data model is governed by two foundational system tables: `sharepointsite` (defines base URLs and site collections) and `sharepointdocumentlocation` (hierarchically defines libraries, relative paths, and regarding record linkages).
- Folder structure creation can be configured as Flat (Entity-Centric, where folders sit directly in the entity library) or Hierarchical (Account-Centric or Contact-Centric, where child entity folders such as Opportunities and Cases are nested inside the parent Account/Contact folder).
- Folders in SharePoint and corresponding `sharepointdocumentlocation` rows in Dataverse are provisioned on-demand when a user first accesses the 'Documents' tab on a record, not upon record creation.
- Dataverse Security Roles and SharePoint Permissions are completely independent: a user must possess appropriate Dataverse table privileges to see the record AND SharePoint site/library permissions to view, upload, or modify files.
SharePoint & OneDrive Document Management Integration
While Microsoft Dataverse is optimized for relational business data, transactional processes, and process automation, enterprise business records (such as Accounts, Contracts, Proposals, and Support Cases) require robust document management capabilities including version control, co-authoring, large file storage, check-in/check-out workflows, and granular document lifecycle management. Microsoft Dataverse delivers this through Server-based SharePoint Integration and OneDrive for Business Integration. On the PL-200 exam, functional consultants must understand how to enable server-based integration, configure folder hierarchies, navigate the underlying document entity model, embed document grids on model-driven forms, and manage the critical security boundary between Dataverse and SharePoint.
1. Architecture of Server-Based SharePoint Integration
Server-based SharePoint Integration establishes a direct, secure server-to-server (S2S) connection between Microsoft Dataverse and SharePoint Online (or SharePoint On-Premises) using Microsoft Entra ID authentication.
+-----------------------------------------------------------------------------------+
| SERVER-BASED SHAREPOINT INTEGRATION ARCHITECTURE |
| |
| +---------------------------+ +-----------------------------------+ |
| | MICROSOFT DATAVERSE | | MICROSOFT SHAREPOINT ONLINE | |
| | | Microsoft | | |
| | +---------------------+ | Entra S2S | +-----------------------------+ | |
| | | SharePoint Site | | OAuth | | SharePoint Site Collection | | |
| | | (Base URL & Status) |<==============>| | (e.g. /sites/CRMDocuments) | | |
| | +----------+----------+ | | +--------------+--------------+ | |
| | | (1:N) | | | | |
| | +----------v----------+ | | +--------------v--------------+ | |
| | | SharePoint Document | | REST / CSOM| | Document Libraries: | | |
| | | Location |<==============>| | - /account | | |
| | | (Relative URL & | | | | - /Contoso_GUID | | |
| | | RegardingObjectId) | | | | - /opportunity | | |
| | +----------+----------+ | | | - /Project_Apollo_GUID| | |
| | | | | +-----------------------------+ | |
| | +----------v----------+ | +-----------------------------------+ |
| | | Model-Driven App Form| | ^ |
| | | - Related -> Docs | | | |
| | | - Embedded Subgrid |=================================| |
| +---------------------------+ Office Online / Direct File Access |
+-----------------------------------------------------------------------------------+
Why Server-Based Integration?
Legacy SharePoint integration relied on client-side authentication and the Microsoft Dynamics CRM List Component (an ActiveX/sandbox solution). Modern Server-based integration provides distinct architectural advantages:
- No Client Footprint: Operates entirely at the cloud server tier; users do not need special browser extensions, ActiveX controls, or local client software.
- Modern Authentication: Authenticates seamlessly via Microsoft Entra S2S tokens, eliminating prompt loops and third-party cookie restrictions.
- Full Device Parity: Delivers identical document management capabilities across web browsers, tablets, and the Power Apps mobile app.
- Office Online Co-Authoring: Enables users to open, view, and co-author Word, Excel, and PowerPoint documents directly inside model-driven apps via Office Online.
The Dual-Security Model (Crucial Exam Concept)
Dataverse and SharePoint maintain completely separate security models:
- Dataverse Security: Governs whether a user can see, create, edit, or delete a Dataverse record (e.g., an Account or Opportunity).
- SharePoint Security: Governs whether a user has permissions (Read, Edit, Full Control) on the underlying SharePoint site, library, or folder.
[!WARNING] Exam Trap - Permissions Synchronization: Dataverse does not synchronize security roles or record ownership to SharePoint folder permissions by default. If a user has Read/Write permissions on an Account record in Dataverse but has no access to the connected SharePoint site, clicking the "Documents" tab will throw a SharePoint Access Denied (403) error. Both Dataverse privileges and SharePoint permissions must be granted to the user independently.
2. Configuration Workflow in Power Platform Admin Center
Setting up SharePoint integration involves three sequential configuration stages:
+-----------------------------------------------------------------------------+
| SHAREPOINT INTEGRATION CONFIGURATION FLOW |
| |
| [1. ENABLE INTEGRATION] [2. RUN DOC MGMT WIZARD] [3. FOLDER STRUCTURE]|
| PPAC -> Settings -> Select entities to enable Choose Default flat |
| Integration -> Document (Account, Contact, Lead, structure OR check |
| management settings -> Opportunity, Custom) and 'Based on entity' |
| Enable Server-based specify SharePoint Site (Account / Contact |
| SharePoint Integration. URL. hierarchy). |
+-----------------------------------------------------------------------------+
Step 1: Enable Server-Based SharePoint Integration
- In the Power Platform Admin Center (PPAC), navigate to Environments -> [Select Environment] -> Settings -> Integration -> Document management settings.
- Click Enable Server-based SharePoint Integration.
- Choose whether SharePoint is Online or On-Premises.
- Enter the SharePoint Site Collection URL (e.g.,
https://contoso.sharepoint.com/sites/sales). - The system validates the URL and executes a server-to-server handshake via Microsoft Entra ID.
Step 2: Document Management Settings Wizard
Once server-based integration is active, run the Document Management Settings wizard:
- Select the tables to enable for document management (e.g., Account, Contact, Lead, Opportunity, Incident/Case, and any custom tables).
- Specify the default SharePoint Site URL.
- Configure the Folder Structure strategy.
Step 3: Folder Structure Selection (Flat vs. Hierarchical)
The wizard presents a pivotal architectural decision: whether to structure folders flatly per entity or hierarchically based on parent Account or Contact records.
+-----------------------------------------------------------------------------+
| FOLDER STRUCTURE STRATEGY COMPARISON |
| |
| FLAT (DEFAULT ENTITY-CENTRIC): |
| /sites/sales/ |
| ├── /account/ |
| │ └── /Contoso Corporation_B4E1/ -> [Account Files] |
| ├── /opportunity/ |
| │ └── /Project Apollo_89F2/ -> [Opportunity Files] |
| └── /incident/ |
| └── /Case 1042_31C0/ -> [Case Files] |
| |
| HIERARCHICAL (ACCOUNT-BASED): |
| /sites/sales/ |
| └── /account/ |
| └── /Contoso Corporation_B4E1/ |
| ├── [Account Direct Files] |
| ├── /opportunity/ |
| │ └── /Project Apollo_89F2/ -> [Opportunity Files] |
| └── /incident/ |
| └── /Case 1042_31C0/ -> [Case Files] |
+-----------------------------------------------------------------------------+
| Folder Structure Type | SharePoint Hierarchy Layout | Best Used When |
|---|---|---|
| Flat Structure (Unchecked) | [Site]/[EntityName]/[RecordName_GUID]<br/>Example: /sites/sales/opportunity/Apollo_89F2 | The organization manages opportunities, leads, or cases independently without strong account grouping. |
| Hierarchical Structure (Checked: Account) | [Site]/account/[AccountName_GUID]/[ChildEntityName]/[ChildRecordName_GUID]<br/>Example: /sites/sales/account/Contoso_B4E1/opportunity/Apollo_89F2 | The organization is account-centric; all proposals, quotes, and cases belong under the master Account folder in SharePoint. |
| Hierarchical Structure (Checked: Contact) | [Site]/contact/[ContactName_GUID]/[ChildEntityName]/[ChildRecordName_GUID]<br/>Example: /sites/sales/contact/JaneDoe_11A2/incident/Case_31C0 | B2C environments where individual consumers (Contacts) own all related transactions and cases. |
[!IMPORTANT] Folder Name Format: SharePoint folder names generated by Dataverse follow the naming convention:
[Record Name]_[Record GUID without hyphens](e.g.,Contoso Ltd_7a2e8c84d67341e2b5e28a491d904721). The GUID suffix ensures folder names remain globally unique in SharePoint even if two Dataverse records have identical names.
3. The Dataverse Document Entity Architecture
Behind the user interface, Dataverse manages SharePoint connections using two core tables:
+-----------------------------------------------------------------------------+
| DATAVERSE DOCUMENT MANAGEMENT DATA MODEL |
| |
| +-----------------------------------------------------------------------+ |
| | SharePoint Site (`sharepointsite`) | |
| | - `absoluteurl`: Base URL of SharePoint site collection | |
| | - `isdefault`: True for primary organization site | |
| | - `statuscode`: Validation status (Succeeded / Failed) | |
| +-----------------------------------+-----------------------------------+ |
| | 1:N |
| v |
| +-----------------------------------------------------------------------+ |
| | SharePoint Document Location (`sharepointdocumentlocation`)|
| | - `parentsiteorlocation`: Lookup to `sharepointsite` OR parent | |
| | `sharepointdocumentlocation` | |
| | - `relativeurl`: Folder or library path name (e.g., 'account') | |
| | - `regardingobjectid`: Polymorphic lookup to target record | |
| | (e.g., Account, Opportunity, Case) | |
| | - `locationtype`: General (0) / Dedicated (1) | |
| +-----------------------------------------------------------------------+ |
+-----------------------------------------------------------------------------+
1. sharepointsite Table
- Stores the base URL and connection parameters for each integrated SharePoint site collection or subsite.
- Contains a Validate action on the command bar that tests server-to-server connectivity and marks the status as Succeeded or Failed.
- Multiple site records can exist (e.g., Sales Site, Legal Site, Support Site).
2. sharepointdocumentlocation Table
- Represents a specific folder or document library in SharePoint linked to a Dataverse record.
- Utilizes a recursive parent-child hierarchy via the
parentsiteorlocationlookup:- The root location for a table (e.g.,
account) points to thesharepointsite. - An individual record location (e.g.,
Contoso_B4E1) points to the table root location (account) as its parent. - In a hierarchical structure, a child opportunity location points to the parent
Contoso_B4E1document location.
- The root location for a table (e.g.,
- The
regardingobjectidpolymorphic lookup establishes the direct relationship to the specific Dataverse row.
On-Demand Folder Provisioning
A vital architectural characteristic tested on the exam is On-Demand Provisioning:
- Creating a new Account or Opportunity record in Dataverse does not immediately create a folder in SharePoint.
- The SharePoint folder and corresponding
sharepointdocumentlocationrecord are created only when a user navigates to the "Related -> Documents" tab or interacts with an embedded document subgrid on that specific record for the very first time.
4. Document Management Experience in Model-Driven Apps
Once configured, users interact with SharePoint documents directly within model-driven forms through the Related -> Documents navigation item or an embedded Document subgrid.
+-----------------------------------------------------------------------------+
| MODEL-DRIVEN FORM: DOCUMENT COMMAND BAR |
| |
| [+ New] [Upload] [Check Out] [Check In] [Discard Check Out] [Edit Loc]|
| ------------------------------------------------------------------------- |
| NAME MODIFIED MODIFIED BY VERSION |
| Proposal_v2.docx 10 mins ago Sarah Connor 2.1 |
| Master_Agreement.pdf Yesterday John Doe 1.0 |
| Cost_Model.xlsx Aug 14, 2026 Alex Smith 3.0 (Checked Out)|
+-----------------------------------------------------------------------------+
Supported Document Operations
- New: Instantly create a new Word, Excel, PowerPoint, or OneNote notebook directly in the linked SharePoint folder.
- Upload: Upload one or multiple files from the local computer.
- Check Out / Check In: Lock a document in SharePoint to prevent concurrent overwrites by colleagues while editing, and check in a new version with comments when finished.
- Version History: Inspect historical revisions, view previous drafts, and restore earlier versions.
- Open in SharePoint: Launch the native SharePoint document library interface in a new browser tab.
- Edit in Office Online / Desktop: Open documents for real-time collaborative editing in Word/Excel Online or full desktop applications.
- Edit Location / Add Location: Point the record to an existing SharePoint folder or link multiple document locations across different sites to a single Dataverse record.
5. OneDrive for Business Integration
In addition to collaborative SharePoint team libraries, Dataverse supports OneDrive for Business Integration.
Architectural Purpose & Mechanics
- Personal Working Space: While SharePoint is designed for shared, collaborative team documentation, OneDrive for Business is designed for private, personal working documents.
- Storage Location: Files uploaded via the OneDrive tab are stored in the user's personal OneDrive for Business storage account under
OneDrive/CRM/[EntityName]/[RecordName_GUID]. - Privacy Boundary: By default, files stored in OneDrive for Business are private to the individual user who uploaded them. Other Dataverse users cannot view the file unless the owner explicitly shares it from their OneDrive interface.
| Dimension | SharePoint Integration | OneDrive for Business Integration |
|---|---|---|
| Primary Use Case | Collaborative team documents, formal deliverables | Drafts, personal notes, private working files |
| Storage Location | SharePoint Site Document Library | User's personal OneDrive for Business storage |
| Default Visibility | Visible to all users with SharePoint library access | Private to the uploading user only |
| Co-Authoring | Full organizational team co-authoring | Limited to users explicitly shared by owner |
| ALM & Lifecycle | Enterprise document retention & compliance policies | Tied to individual user's Microsoft 365 lifecycle |
Enabling OneDrive for Business
- In PPAC, navigate to Settings -> Integration -> Document management settings.
- Click Enable OneDrive for Business.
- Prerequisite: Server-based SharePoint Integration must be enabled first before OneDrive for Business can be activated.
A sales representative opens an Opportunity record in a model-driven app and clicks on the 'Related -> Documents' tab. The user receives an error message stating: 'Error: Access Denied (403). You do not have permission to access the SharePoint location.' The representative has the Salesperson security role in Dataverse and can successfully edit all Opportunity fields. What is the root cause of this issue?
An enterprise organization wants all documents related to Quotes, Opportunities, and Support Cases to be organized inside SharePoint directly within the folder of their parent Account (e.g., /sites/sales/account/Fabrikam_1234/opportunity/Cloud_Migration_5678/). Which setting must the functional consultant configure during the Document Management Settings wizard?
A customizer creates a new Account record named 'Northwind Traders' and saves it in Dataverse. The customizer immediately opens SharePoint Online in another browser tab and searches the Account document library for the 'Northwind Traders' folder, but no folder exists. Why has the folder not been created?
A legal consultant is preparing confidential, preliminary contract notes for an upcoming corporate acquisition. The consultant wants to associate these draft notes with the Account record in Dataverse so they can access them from the form, but needs to guarantee that no other team members can view these draft files until they are finalized and ready for the shared SharePoint library. Which capability should the consultant use?