Hi @Vivek Gupta ,
i understand you want to call MS graph api in the spfx web part. We can get it by means of pnpjs graph, it offers below method:
Please take a reference my test demo:
Test Result:
*Note that not forget to grant permission for ms graph:
Best Regards,
Baker Kong
If the response is helpful, please click "Accept Answer" and upvote it.