Tutorials/Power Apps/Store Files Cost-Effectively: Link SharePoint Libraries to Model-Driven Apps
Power Appsintermediate

Store Files Cost-Effectively: Link SharePoint Libraries to Model-Driven Apps

Leverage SharePoint's low-cost storage, version history, and metadata to manage documents directly inside your model-driven app.

NA
Narmer Abader
@narmer · Published June 3, 2026

When you need to store documents – contracts, proposals, images – inside a model-driven app, Dataverse file storage is not always the most economical or feature-rich choice. SharePoint document libraries cost roughly $0.20/GB compared to $40/GB for Dataverse, and they include built-in versioning, co-authoring, and rich metadata. The good news: you can connect a SharePoint site to any table in a model-driven app and store files directly in that library. This article walks through the integration using a real‑world example.

Scenario: Engagement Management for a Consulting Firm

A consulting firm called Contoso Consulting wants its consultants to store engagement documents inside Power Apps without leaving the model-driven interface. They have a custom table named Engagement with the following columns:

  • Engagement Name (Text)
  • Client Company (Text)
  • Service Line (Choice: Advisory, Audit, Tax, Tech)
  • Budget (Currency)
  • Status (Choice: Active, Pending, Closed)

Sample records look like this:

  • Engagement Name: 2026-001 – Cloud Readiness Assessment Client Company: Northwind Traders Service Line: Tech Budget: 45,000.00 Status: Active

  • Engagement Name: 2026-002 – SOX Compliance Review Client Company: Contoso Pharmaceuticals Service Line: Audit Budget: 120,000.00 Status: Pending

  • Engagement Name: 2026-003 – State Tax Filing Client Company: Alpine Ski House Service Line: Tax Budget: 8,500.00 Status: Closed

The app’s main form shows these fields, and the main view lists all engagements. All documents for an engagement (e.g., SOW, signed contracts, deliverables) should live in SharePoint.

Step 1: Create the Table and Model-Driven App

  1. Open the Power Apps maker portal and create a solution. Inside it, add a new table named Engagement with the columns listed above.
  2. Build a Main Form that includes the engagement fields. Build the Engagement Main View to show the fields you care about (e.g., Name, Client, Status).
  3. Create a model-driven app and add the Engagement table as a page. Publish the app and assign appropriate security roles.

No document library exists yet – that’s the next step.

Step 2: Provision a SharePoint Site

You need a SharePoint site that will host the document libraries. Create a new SharePoint Team site (communication sites work too, but team sites are simpler for this integration). Name it something like ContosoEngagementDocs. No additional configuration is required; the integration will handle the structure automatically.

Step 3: Enable Server-Based SharePoint Integration

Now connect Power Apps to SharePoint.

  1. In the model-driven app (or the maker portal), click the gear icon (Settings) in the top‑right corner and choose Advanced Settings.
  2. Under System, select Document Management.
  3. Click Enable Server-Based SharePoint Integration. (
    Prerequisites
    Ensure you have a valid SharePoint license and that the SharePoint site you intend to use is accessible to all users who will interact with documents. The integration uses the same site for all tables you connect.
    )
  4. In the wizard, choose Online as the deployment type.
  5. Provide the full URL of the site you created (e.g., https://contoso.sharepoint.com/sites/ContosoEngagementDocs). Click Next.
  6. Wait while the site is validated. Once successful, click Enable.

A confirmation message appears when the integration is active.

Step 4: Define Which Tables Use a Document Library

With the SharePoint integration enabled, you must tell Power Apps which tables should get their own document library.

  1. Return to Advanced Settings > Document Management.
  2. Click Document Management Settings.
  3. Select the Engagement table (you can choose multiple tables if needed).
  4. Do not check Based on Entity unless you are using the Account or Contact standard tables.
  5. Click Next. The wizard automatically creates a SharePoint document library named after the table (e.g., Engagement). Wait for the creation process to finish.
  6. On the final page you see the Document Library Creation Status. Verify it shows Succeeded and click Finish.

Behind the scenes, a SharePoint document library called Engagement is created in your site. The integration also sets up a folder for each Engagement record.

Permissions
SharePoint library permissions are inherited from the site. Make sure all Power Apps users who need document access also have at least Contribute permissions on this site. Otherwise, uploads and views will fail silently.

Step 5: Upload a Document Inside the Model-Driven App

Open an Engagement record in the model-driven app. In the command bar, click Related (or Documents, depending on your layout) to see the Document Associated Grid.

  • Click UploadUpload File.
  • Choose a file from your local machine (e.g., a PDF of the engagement contract).
  • Confirm. The file appears in the grid immediately.

The document is now stored in SharePoint, but you can also access it from the SharePoint site.

Step 6: Understand the File Structure in SharePoint

Navigate to your SharePoint site and open Site Contents. You’ll see a document library named Engagement.

Inside the library, each Engagement record has a subfolder named after its primary key (not the friendly name). Open the folder corresponding to the record you used – you’ll find the uploaded document there.

This folder-based structure keeps files organized and allows direct SharePoint operations (e.g., co-authoring, metadata updates) outside of Power Apps.

Step 7: Surface Documents on the Main Form (Optional)

It’s more convenient for users to see documents without switching to the Related tab. You can add a Documents subgrid directly on the main form.

  1. Edit the Engagement Main Form in the maker portal.
  2. Add a new one‑column tab named Documents.
  3. Inside the tab, add a Subgrid component.
  4. Set Show related records to Yes, choose the table Documents (Regarding).
  5. Select the default view All SharePoint Documents or Active SharePoint Documents.
  6. Save and Publish.

When you open the form, the Documents tab displays the subgrid with all files for that Engagement record. Users can upload new files directly from the grid.

Security and Performance Notes

  • Delegation: When querying documents from a SharePoint library inside Power Apps (canvas apps), delegation limits apply. In model-driven apps, the grid handles this automatically – you can search and sort across thousands of files without issues.
  • File Size Limits: SharePoint Online accepts files up to 250 MB by default (can be increased to 2 GB with site collection configuration). For larger files, consider Dataverse file storage or Azure Blob.
  • Version History: Every file update creates a new version. You can restore previous versions from SharePoint. This is free and automatically enabled.
  • Metadata: You can add custom columns to the document library in SharePoint and later surface them in Power Apps. The document association grid can display those extra fields.

Common Mistakes & Troubleshooting

ProblemLikely CauseSolution
Document grid is emptySharePoint site not validatedRe-run the Enable Server-Based SharePoint Integration wizard
Upload button grayed outUser lacks contribute permissions on the libraryGrant at least Contribute access on the SharePoint site
“Path not found” errorDocument library not fully createdWait a few minutes and retry. Verify in SharePoint that the library exists
Wrong folder structureBased on Entity was accidentally selectedRemove the association and re-create document management for the table
Changes not saved on formModel-driven app form not publishedPublish the form from the maker portal

Final Recommendation

If your model-driven app stores documents that don’t exceed 250 MB per file and you want low‑cost, versioned storage with full SharePoint integration, this approach is a win. It saves you Dataverse capacity costs and leverages features like metadata, co‑authoring, and retention policies. For extremely large files (e.g., video files, CAD drawings) or when you need to apply Dataverse business rules directly on the file, Dataverse file columns are still the better choice.

In short, use SharePoint for documents that need to be cheap and shared; use Dataverse for files that must be tightly bound to business logic.

References

  • Original reference article by Matthew Devaney: How To Setup SharePoint Integration: Model-Driven Power Apps
  • Microsoft Learn – Set up SharePoint document management: [Link placeholder – search “Enable SharePoint document management in model-driven apps”]
  • Microsoft Learn – Document management settings: [Link placeholder – search “Document management settings model-driven apps”]