Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

PCF Controls inside Canvas App - How to call Dataverse APIs?

(0) ShareShare
ReportReport
Posted on by 49

Hi All, 

 

PCF Controls can utilize the Xrm.WebApi client-side sdk from inside Model Driven Apps, without having to go through the trouble of authentication. 

For Canvas Apps, this will not work. Wondering if anyone has implemented any workarounds in their PCF controls for Canvas Apps to make server-side calls to Dataverse?
Theoretically it should be possible to generate the Auth bearer token and then use it to execute the Dataverse API calls. But are there any successful samples out there?

 

PS: Noticed that there is an idea to implement the same from @ScottDurow  here - https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Allow-calling-Xrm-WebApi-from-PCF-controls-inside-Canvas-Apps/idi-p/687779

 

Thanks in advance!

  • Hemant Gaur Profile Picture
    on at
    Re: PCF Controls inside Canvas App - How to call Dataverse APIs?

    No, we don;t support authentication in PCF controls and it is in the backlog. Not in at least until OCT 2021 release. 

     

    You can use connectors in certain cases to manage the authentication at a level above PCF . 

     

    hemant 

  • Shidin Haridas Profile Picture
    49 on at
    Re: PCF Controls inside Canvas App - How to call Dataverse APIs?

    Thanks @HemantG for the quick response!

    Have a follow-up question around PCF / road-map of Dataverse REST API. 
    From a PCF control (for canvas apps), is it possible to do the following?

    1. Authenticate with Azure AD via MSAL.js (or some external library)
    2. Use the Bearer / Access Token to connect to a Dataverse environment and execute an action  

     

    Thank you! 🙂

  • Hemant Gaur Profile Picture
    on at
    Re: PCF Controls inside Canvas App - How to call Dataverse APIs?

    WebAPI support is not present in the canvas apps and you can use the Dataverse connector and patch calls to work against the backend - Microsoft Dataverse - Connectors | Microsoft Docs.

     

    We are revisiting the web api design, one of the limitation is that there is no metadata to indicate what entity and action is called in the code even though we have the web api usage declaration. Contrast this with the canvas apps data source, if you use the account table for gallery control, solution detect the account (or custom entity dependency) , 

     

    hemant

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 109 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 82 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

Overall leaderboard