Forum Discussion

cczarnuch830's avatar
cczarnuch830
Copper Contributor
Jul 08, 2021
Solved

Unable to get meeting details from microsoft teams app using react

Hello,

 

I'm currently writing a Microsoft Teams meeting side panel app in react and I need to get the scheduled start time of the meeting. I am trying to use the meeting module (https://docs.microsoft.com/en-us/javascript/api/@microsoft/teams-js/microsoftteams.meeting?view=msteams-client-js-latest) `getMeetingDetails` method. When I call this from my app, the error is {errorCode: 1000, message: "App doesn't have sufficient permission to use this API"}. 

 

What I've tried to do:

1. In the teams manifest under `webApplicationInfo`, add the App Registration Client ID and URI with applicationPermissions: ["OnlineMeeting.ReadBasic.Chat"]

2. In the App Registration, add OnlineMeetings.Read.All and OnlineMeetings.Read under API permissions.

 

This link (https://docs.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent#obtain-an-access-token-from-the-microsoft-identity-platform) shows how to use the graph API to get this data, but I'd like to use the microsoftTeams library as it's cleaner.

 

Is there something I need to do with the authentication module? (https://docs.microsoft.com/en-us/javascript/api/@microsoft/teams-js/microsoftteams.authentication?view=msteams-client-js-latest) Or are there other steps that I need to do in order to give permissions to use this API?

 

Thank you

2 Replies

Resources