Reputation: 81
I want to use the GetParticipant API based on the javascript code below.
Where can I get the meetingID, tenantID, and partialID when using this code?
https://learn.microsoft.com/en-us/microsoftteams/platform/apps-in-teams-meetings/create-apps-for-teams-meetings?tabs=javascript#getparticipant-api
However, I get the following error and cannot get it.
(node: 49596) UnhandledPromiseRejectionWarning: Error: / v1 / meetings / {meetingID} / partials / {participantID} does not exist
As a result of the investigation, I think that one of the meetingID, tenantID, and partialID is wrong as the cause. When testing the Get Participant API, the above three IDs are obtained using the following code.
microsoftTeams.getContext (function (context) {
var participantID = context.userObjectId;
var meetingID = context.meetingId;
var tenantID = context.tid;
})
How can I actually get the meetingID, tenantID, and partialID?
If anyone knows how to get it or the official document that describes how to get it, I would appreciate it if you could tell me.
Upvotes: 0
Views: 172
Reputation: 792
We were able to get the meetingID, tenantID, and participantID from the turnContext's activity
meetingID - string
participantID - user aad object id (GUID)
tenantID - user tenant id (GUID)
Also, If you are using it in the context of meeting. You can also get the meetingID from there. E.g. for OnTeamsMeetingStartAsync, we get MeetingStartEventDetails object that contains meeting related info.
Upvotes: 0