In modern Microsoft Power Apps Code Apps, data integration is no longer done through drag-and-drop connectors like Canvas Apps. Instead, developers use the Power Apps CLI (PAC CLI) and a generated TypeScript SDK to connect to data sources such as Microsoft SharePoint.

Prerequisites

Step wise Implementation

Step 1 : Prepare your SharePoint list.

Screenshot 2026-05-22 151526

Step 2: Add SharePoint as a Data Source (PAC CLI)

pac code add-data-source -a "shared_sharepointonline" -c "shared-sharepointonl-0000000-axxx-4ccxx-8wwee-ffffxxx00xx" -t "Demo" -d "https://tenant.sharepoint.com/sites/PACASite"

Step 3: What happens after you add SharePoint

Once added, Code Apps automatically generate:

Screenshot 2026-05-22 152445Screenshot 2026-05-22 152523

Reference: https://learn.microsoft.com/en-us/power-apps/developer/code-apps/how-to/connect-to-data

Conclusion

In this way, we can successfully add SharePoint as a data source to a Power Apps Code App using the pac code add-data-source command