web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Launching SharePoint A...
Power Apps
Answered

Launching SharePoint Apps with/from an PCF Component

(0) ShareShare
ReportReport
Posted on by 21

Hey all! 

 

Sorry if this question is a simple one, I am just getting into PCF Components...

My Goal is to develop a PCF Component (model or canvas app doesnt matter) for dynamics 365, with the aim to create/edit sharepoint files and save it in dynamics 365.

I have seen ways to get existing data via the SharePoint API, however, I am not sure if its possible to call the SharePoint API from a PCF Component.

 

My main Question would be: 

Is it possible to launch the online version of Excel, Word,... from or within a PCF Component? 

 

Thank you and best regards

 

I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    Well, you can effectively have your PCF just be an IFrame. In fact, this is one of the example PCFs published by Microsoft. That IFrame in turn can render any page, including a SharePoint App, which lets you run straight past authentication mechanisms and API call complexities.

     

    Alternatively. you can make the API calls directly from your PCF to SharePoint (bypassing the SharePoint App entirely). To do this, though, you will need to handle your own authentication for the calls, so you will probably want an App Registration with Delegate permissions to SharePoint, then use MSAL to retrieve the currently logged in user's token and pass it through. You could also offload the calls to a server-side component, like a Function, but to me this seems like an unnecessary number of hops.

  • TheTruePowerDev Profile Picture
    21 on at

    Hello!

    I would actually prefer to call the SharePoint API instead of opening SharePoint in an iFrame.
    Is there any Sample I could follow in order to incorporate SharePoint with PCF?
    I have found out, that there is a SharePoint-REST-Service , is this the API you mentioned?
    Are there any restrictions, that would limit me from calling the mentioned REST-Service  from a PCF-Control in Dynamics 365 online? It just wasnt sure, since I couldnt find any sample that incorporates the SharePoint API with a PCF-Control and since I also found a forum entry in which it was stated that its not possible for PowerApps Portals.

    Thanks for your reply! 🙂

  • Verified answer
    cchannon Profile Picture
    4,702 Moderator on at

    There are actually two SharePoint APIs: the REST API and the CSOM API. CSOM is older but has widespread adoption among SharePoint developers, so it might be easier to find team members who are familiar with it.

     

    There are a couple example PCFs on the PCF Gallery that work with SharePoint content; not sure whether they are actually using the REST API but it is worth taking a look at their code.

     

    Generally, when you go to implement API calls in a PCF your biggest issue is going to be authentication. You will need to secure the currently logged in user's credentials securely then pass those on to the API you are calling. As I mentioned in the previous reply the normal mechanism for this is to register an App with AD, give it Delegate permissions to SharePoint (or whatever app), then use MSAL in your app to retrieve the user token and pass it in your API call.

     

    The only realistic alternative to this is to offload the calls to some server-executing component where the code cannot be interrupted by a malicious user to inspect the authentication. From that externally executing context you can use any credentials you want, including an app id that has app permissions instead of delegate ones.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 602

#2
WarrenBelz Profile Picture

WarrenBelz 473 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 310

Last 30 days Overall leaderboard