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:
*Note that not forget to grant permission for ms graph:
If the response is helpful, please click "Accept Answer" and upvote it.