Accessing Graph Api from Team Toolkit personal tab

Kevin Thankachan 41 Reputation points

I'm trying to access the graph API from a personal tab setup using Microsoft teams tool kit.
I have created an Azure app and given the appropriate permissions.
I'm trying to read the current users details. All i get is the generic error- No response from the server.
Please let me know what additional steps i need to do to fix this.

import { graph } from '@pnp/graph/presets/all'  ;  
import { AdalFetchClient } from "@pnp/nodejs";  
  graph: {  
      fetchClientFactory: () => {  
          return new AdalFetchClient("***********-f3bf-4315-******", "d36b0cfb-368c-4573-b488-940b4de29514", "Password");  
private async getUserDetails()  
      }).catch((err) => {    
          console.log("Graph API Error "+err);  
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,323 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,035 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Kevin Thankachan 41 Reputation points

    Apologies for the late reply..From the console log, all i could get is "No response from the server."