Graph api call working on teams webapp but not in Teams Desktop

Occasional Contributor

I'm making a call to get online meeting infos
but when I call graph api using this code on desktop app :



export default function meetingInfos(graph: Client): Promise<IMeetingInfos> {
  // alert("graph" + JSON.stringify(graph));
  return new Promise((resolve, reject) => {
    try {
      microsoftTeams.getContext(async (context) => {
        try {
          let meeting;
          try {
            meeting = await graph.api(`/chats/${context.chatId}`).get();
          } catch (error) {
            // alert("alert:****" + error);
          // alert(" meeting infos" + meeting);
          const meetingInfos = await graph
              `$filter=joinWebUrl eq '${meeting.onlineMeetingInfo.joinWebUrl}'`

        } catch (error) {
          // alert(error);
    } catch (error) {
      console.error(" error", error);


I get error


alert:****Error: Failed to get access token cache silently, please login first: you need login first before get access token.



But I'm able to get the api call working when I use Teams App on web.


I tried to logout then login in the desktop app : no fix
Remove cache : `rm -r ~/Library/Application\ Support/Microsoft/Teams`

Uninstall teams et reinstall it : no fix.


3 Replies
@hmzdev- Thanks for reporting your issue.
We will check it from our end and get back to you.
Thank you , do you need my tenant id ?
@hmzdev - We are not able to repro the issue, could you please provide Timestamp, Operation Id and tenant id so that we can investigate it from our end.