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

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!


Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (26,370)