Recursive Retrieval of SharePoint Documents in Canvas Apps using the GraphAPI Connector and PowerFx
Power Apps
Sep 1, 2023 3:30 PM

Recursive Retrieval of SharePoint Documents in Canvas Apps using the GraphAPI Connector and PowerFx

by HubSite 365 about Diana Birkelbach [MVP]

Dianamics PCF Lady | Microsoft MVP | Blogger | Power Platform Community Super User | 👩‍💻 Dynamics 365 & PowerPlatform Developer | ORBIS AG

Citizen DeveloperPower AppsSharePoint OnlineLearning Selection

Lately I had a requirement to show the documents from SharePoint related to a Dynamics 365 implementation. The Canvas App or Custom Page should be able to show

The blog discusses how to retrieve SharePoint documents recursively using the GraphAPI Connector and PowerFx. The author had a requirement to display SharePoint related documents for a Dynamics 365 implementation on either a Canvas App or Custom Page. The solution should allow the page to provide an overview of multiple SharePoint sites. The author initially experimented with using the SharePoint (Document Library) connector and a cloud flow, but faced limitations in terms of speed and connecting to various SharePoint sites.

  • The solution instead utilizes the GraphAPI, as guided by Reza Dorrani's videos.
  • The author showed how to use GraphAPI to test links to different sites and retrieve site IDs.
  • The author also mentions how to access documents in subfolders through a recursive loop by using a slider control for the collection.
  • A Canvas App is utilized to display documents by using filters to exclude folders. The contents of the GraphAPI response can be found using a monitor, and individual document components are defined in the gallery.
  • Finally, the ability to preview documents using an IFrame PCF is described, using the GraphAPI to retrieve the preview URL for the document.

Further Investigation into the Recursive Retrieval of SharePoint Documents

The chosen solution allows for the dynamic connection to multiple SharePoint sites and is adaptable for future changes in SharePoint sites. This solution, founded on the GraphAPI, provides custom capabilities like inputting the name of a site, and retrieving corresponding site IDs. The solution also manages to efficiently loop through all the subfolders and effectively retrieve documents. Using the Canvas App for display, the folders are successfully being filtered out to show only document files. This dynamic solution also offers a robust document preview functionality by utilising an IFrame PCF. The preview URL can be retrieved from GraphAPI, making the solution practical for large scale companies and versatile for a variety of uses.

 

Read the full article Recursive Retrieval of SharePoint Documents in Canvas Apps using the GraphAPI Connector and PowerFx

Learn about Recursive Retrieval of SharePoint Documents in Canvas Apps using the GraphAPI Connector and PowerFx

Microsoft experts can learn how to use GraphAPI to recursively retrieve SharePoint documents in Canvas Apps. This solution is based on GraphAPI and requires Office365Groups. First, the user must input the name of the site they wish to access. To test the requests, the Graph Explorer can be used. Reza Dorrani's videos provide an excellent starting point for understanding the process, including using the SharePoint Document Library connector and Cloud Flow in Power Automate, and connecting directly to SharePoint sites. The GraphAPI docs provide more in-depth information about what can be done. Once the connection is made, a Canvas App is used to show the documents related to the Dynamics 365 implementation. This solution is able to show an overview of multiple SharePoint sites, and is faster than the initial approaches.

 

More links on about Recursive Retrieval of SharePoint Documents in Canvas Apps using the GraphAPI Connector and PowerFx

Using the SharePoint connector with canvas apps
Feb 14, 2022 — The SharePoint connector allows app makers to quickly connect to SharePoint lists and perform create, read, update, and delete operations in a ...
Accessing SharePoint or Graph API using PCF Compon...
Aug 18, 2021 — I am new to PCF components. Currently, I am working in Canvas Apps . I want to build a custom PCF component to bring data from either Graph ...
Flow versus Office365GroupsHttpRequest Connector A...
Mar 1, 2023 — I managed to find a solution for the problem - to land documents (without using a flow) from an attachment control to document library with some ...
Power Apps Custom Connector using Microsoft Graph APIs
Nov 29, 2020 — In this article, I'll show you how to use Microsoft Graph API in Power Apps by building a custom connector, a very useful extensibility ...
COURSE AGENDA
We develop our own courses, keep them up to date with the latest features, and provide you with a printed copy. Enjoy a mix of theory, live demonstrations and ...
Untitled
Blackberry smartphone apps facebook games, Controller base tour minecraft, ... Snd travelog rar file, Port de rades pdf, Modoc book club discussion ...

Keywords

SharePoint Documents Integration, GraphAPI, PowerFx, Dynamics 365, Canvas Apps, Power Automate, Office365Groups, Graph Explorer