Bi-directional sync between SharePoint and Portals

Loading

While Power Pages (Portals) primarily use Dataverse, integrating SharePoint in a bi-directional way requires a hybrid approach using Power Automate, Dataverse, and SharePoint connectors.


Use Case Example

You want a portal form to:

  • Upload files to SharePoint from a portal
  • Display uploaded SharePoint files back on the portal
  • Keep both systems in sync when changes happen

Key Components

  • Power Pages (Dataverse-backed portal)
  • Dataverse Table (e.g., Documents)
  • SharePoint Document Library
  • Power Automate Flows
  • Optional: Custom JavaScript or PCF controls

Sync Strategy

1. Portal to SharePoint (Upload)

  • Use a Power Pages form where users upload documents (stored in Dataverse File/Note table).
  • Trigger a Power Automate flow:
    • Trigger: When a row/file is added in Dataverse (e.g., Annotation table or custom table)
    • Action: Upload that file to SharePoint with metadata.

2. SharePoint to Portal (Sync & Display)

  • Use a Power Automate scheduled flow or SharePoint trigger:
    • Trigger: When a file is created or modified in SharePoint
    • Action: Create or update a matching Dataverse record (e.g., file reference or metadata)
  • Display synced file info on portal using:
    • Entity List
    • Or custom web template with Liquid + JavaScript

Notes

  • Files are not directly synced as attachments, but you can store URLs, metadata, or synced copies.
  • For large files, offload storage to SharePoint and only display links in Power Pages.
  • Use role-based permissions on both SharePoint and Power Pages to secure access.

Security Considerations

  • Use Azure AD-secured SharePoint libraries with limited access.
  • Expose only read-only public links if security isn’t required.
  • Secure Power Automate with environment variables and service accounts.

Advanced Options

  • Use HTTP connectors and Graph API for advanced file sync logic.
  • Implement custom PCF controls to allow seamless file previewing in portal.

Leave a Reply

Your email address will not be published. Required fields are marked *