Showing results for 
Search instead for 
Did you mean: 
Not applicable

PCF-React Control Using webAPI

Hi Folks,

Im a frontend developer and new to PCF and Powerapps component framework. I'm trying to retrieve data from an entity using retriveRecord but was not working even after deployed. 

This is the code which i have used in the pcf control.I'm aware about the webAPI not supported in the test harness but In the test harness at least I'm getting the error response. After deploying the control we are not getting any success or error console logs.


We are also getting a authentication error from skype-sdk file.


(the id and entity logical name is dummy here)


const retriveData=async () => {
console.log("log from retriveData");
let id="1";
let filter=`$select=firstname,lastname`;
let options="";
      .retrieveRecord("leads", id, filter)
      .then(successCallback, errorCallback);
const successCallback= (response: any) => {
console.log(response, "WebApi succss Response");
const errorCallback= (errorResponse: any) => {
console.log(errorResponse, "WebApi error Response");




Any help work appreciate!



Hi @Anonymous , 


Did this or something else solve your issue? 


Kind regards,



Not applicable

@DianaBirkelbach, yes I used the context instance from init method. Previously I used to pass the context instance directly from updateview method to the react component. Now its working fine.


private webAPI: ComponentFramework.webapi;
public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement)

Then passed this.webAPI as props of react component in the updateview.

I appreciate your kind help and time to revisit this thread 😀 .


Thnaks & Regards


Helpful resources

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Users online (8,255)