Microsoft Data verse supports SharePoint Online integration that enables you to use SharePoint document management capabilities from within Data verse. Manage SharePoint Documents Power Apps portals now support uploading and viewing documents to and from SharePoint directly in a basic form or advanced form in a portal. This allows portal users to view, download, add, and remove documents from a portal. Portal users can also create subfolders to organize their documents.
To work with SharePoint document management capabilities within Data verse you must:
- Enable document management functionality for your environment
- Configure SharePoint integration from the Power Apps portals admin center
- Enable document management for tables
- Configure the corresponding form in Power Apps documents
- Create the appropriate table permission and assign it to the appropriate web role
Step 1: Enable document management functionality in model-driven apps
You must enable document management functionality in your model-driven apps using server-based SharePoint integration. Server-based SharePoint integration enables model-driven apps and SharePoint Online to make a connection between servers. The portal uses the default SharePoint site registration. For information about how to enable document management functionality in model-driven apps, see Configure model-driven apps to use SharePoint Online.
Step 2: Configure SharePoint integration from the Power Apps Portals admin center
To use SharePoint document management capabilities, you must enable SharePoint integration from the Power Apps Portals admin center.
Select Enable in the confirmation window. This will allow the portal to communicate with SharePoint. While the SharePoint integration is being activated, the portal will reboot and will be unavailable for a few minutes. A message appears when SharePoint integration is enabled.
When SharePoint integration is enabled, the following action is available:
Disable SharePoint Integration – Allows you to disable SharePoint integration with your portal. While the SharePoint integration is being disabled, the portal will reboot and will be unavailable for a few minutes. A message appears when SharePoint integration is disabled.
Enabling or disabling SharePoint integration will update the Azure Active Directory (Azure AD) application for the portal and add or remove the required SharePoint permissions, respectively. You will also be redirected to consent to the changes being made to the Azure AD application.
If you do not give your consent:
Enabling or disabling SharePoint integration will not complete and an error message will be displayed.
Your Azure AD login to the portal will not work.
Step 3: Enable document management for tables
You must allow Document Management for Tables to store documents related to table records in SharePoint. For information about how to enable document management for tables, see Enable SharePoint document management for specific tables.
Step 4: Configure the appropriate form to display documents
Power Apps customization
Identify the form where you want to use document management features. You must edit the form using the form-driven apps form editor and add a sub grid to it. The sub grid adds a section to the form, allowing you to work with documents from a portal. You must set the following properties on the sub grid for this feature to work:
Under Data Source , select Document Locations from the Table list .
Under Data Source , select Active Document Locations from the Default View list .
You can specify the name and label according to your needs. Save and publish the form once the sub grid has been added and configured.
Configuring Power Apps portals
Apart from the standard settings required for the basic form or the advanced form, you must set the following properties to enable document management:
Table Name and Form Name – Specify the custom table and form names in the previous step, respectively.
Select the Enable table permission on form check box to allow a user to read the documents.
Set the Mode to Edit to allow document uploads.
Step 5: Create the appropriate table permission and assign it to the appropriate web role
Two table permission records are needed to establish the access required to view and upload documents.
- Permissions on the table of the table form or the advanced form:
Create a Table Permission record that specifies the Table Name as the entity of the table form or the basic or advanced form configured above.
- Select an Access Type and an access type relationship that is appropriate for the behavior of the form that you want.
- Enable the Read and Append To privileges to allow read access to the documents, and optionally enable the Write privilege to allow document uploads. Skip the Child Table Permissions section for now, as it will be filled in in the next step.
- Permissions in the Document Location with the type of primary access that refers to the previous record of the permission:
- Create a Table Permissions record specifying the Table Name as Document Location table with Access Type set to Primary .
- Select the parent table permission for the table permission record created in the previous step.
- The minimum privileges to allow read access to documents are Read , Create , and Append .
Include Write privileges for document upload access.
- Include Delete to allow the deletion of a document.
Set upload file size
By default, the file size is set to 10 MB. However, you can set the file size to a maximum of 50 MB using the site settings SharePoint/Max Upload Size.
Maximum file download size
We recommend limiting the size of individual files available for download to 250 MB or less. If you use portals to download larger files from SharePoint, the operation might time out after a couple of minutes.
Example configuration to enable document management in the basic Case form
The following example shows the configuration with the cases table that is required by the Dynamics 365 Customer Service app as a prerequisite. Although this example uses the cases table, it is just an illustration of the steps mentioned above and can be followed with any other custom table or any Data verse table that supports document management in SharePoint.
Follow the instructions in Step 1 to ensure server-based setup is complete for your environment and SharePoint integration.
- Follow the instructions in Step 2 to ensure that the portal has permissions to integrate with SharePoint.
- Follow the instructions in Step 3 to ensure document management is enabled for the Case table.
- Follow the instructions in Step 4 with the following settings:
Model-driven app customization
a. Go to Personalization’s > Personalization > System Personalization .
b. In the Default Solution , go to Table Case > Forms .
c. Open Web – edit Case in the form editor.