Nov 24 2022 12:25 PM
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
.api(
`https://graph.microsoft.com/beta/me/onlineMeetings?$filter=joinWebUrl eq '${meeting.onlineMeetingInfo.joinWebUrl}'`
)
.get();
console.log(meetingInfos);
resolve(meetingInfos);
} catch (error) {
// alert(error);
reject(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.
Nov 24 2022 09:52 PM
Nov 25 2022 12:10 AM
Nov 28 2022 04:55 AM