SOLVED

Teams Meeting Extension - Side Panel App - How to get attendees emails list

Copper Contributor

Hi Community, 

We are developing a Microsoft Teams meeting extension. In order to embedded details related to our system info, we need to get the emails list of attendees of the specific meeting. Tried many ways including graph API but it couldn't identify the meeting ID returning from the teams SDK

microsoftTeams.getContext((context) => {
    const meetingID = 
context.meetingId;
})

This returned a meeting id which a format of MCMxOTptZWV0aW5nX01UbG1Zams0WW1ZdFpESXdaUzAwWmpFeUxUbGhaVGd0TW1Ga01XVTVPV05sTnpGaUB0aHJlYWQudjIjMA==
but it does not identify by graph API

Also, we tried 
microsoftTeams.meeting.getMeetingDetails((context=> {
      console.log(context)
 }) 

this method returns errorCode: 1000, message: "App doesn't have sufficient permission to use this API"

Is there any simple way to get a meeting attendees list from teams meeting optimized tab apps?
or is this feature not yet released to third-party developers?

8 Replies

@priyantha125 - Could you please share the Graph API docs which you are referring?
Also make sure that you have provided proper API permissions to call it.

H@ChetanSharma-msft,  thanks for the response,

I have tried the below APIs

calender event API
https://docs.microsoft.com/en-us/graph/api/event-get?view=graph-rest-1.0&tabs=http
groups list member API
https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http

with the below API permissions,
Calendars.Read, Calendars.Read.Shared, email, Group.Read.All, offline_access, openid, profile, User.Read

By the way, while writing this reply, I have found that there is another API to get online meeting info

https://docs.microsoft.com/en-us/graph/api/onlinemeeting-get?view=graph-rest-1.0&tabs=http
But I am not sure whether this will work with teams azure auth token. 
If you know the correct API could you please post it with the required permission and scopes (I want to get meeting attendees in a meeting extension which a meeting created inside MS-Teams )
permissions.JPG
Thank you


Hi @priyantha123,
You can get meeting details using below graph API
https://docs.microsoft.com/en-us/graph/api/onlinemeeting-get?view=graph-rest-1.0&tabs=http

You can get permission details here https://docs.microsoft.com/en-us/graph/api/onlinemeeting-get?view=graph-rest-1.0&tabs=http#permissio...

Can you try this API once and let us know if it works for you ?

Thanks

Hi @Prithvi-MSFT ,
Thanks for the suggestion. I have tried both APIs under onlineMeeting. But unfortunately, I am still getting the original issue I have mentioned at the beginning of this discussion (Meeting Id is corrupted)

 

APIs I have tested
GET /me/onlineMeetings/{meetingId}
GET /users/{userId}/onlineMeetings/{meetingId}


I have attached postman screenshots herewith

online_meeting_error.png

online_meeting_user.png

permissons_new.png

 

Hi @priyantha125,
We are able to repro this at our end ang getting similar error. If we try to create new meeting from graph API and then fetch the details its working. However for meeting id obtained from getContext its giving error. Let me confirm this internally and get back to you.

Thanks
best response confirmed by priyantha125 (Copper Contributor)
Solution

@priyantha125 

The meetingId exposed by the Teams Client SDK differs from the meeting id exposed in Graph. However, you should be able to get the Graph meeting id by making a call to
 
  1. GET /chats/{chat-id}?$select=onlineMeetingInfo
    https://docs.microsoft.com/en-us/graph/api/chat-get?view=graph-rest-beta&tabs=http#example-4-get-the...
  2. There after use the following request to get the OnlineMeeting resource:
    GET /users/{userId}/onlineMeetings?$filter=joinWebUrl eq '{joinWebUrl}'


    You would get the {chat-id} for #1 from a call into Teams Client SDK.

    Response to #2 will give you the correct Graph OnlineMeetingId in case you want to store a mapping for later.



    Thanks, 

    Prasad Das

    ---------------------------------------------------------------------------------------------- 

    If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate. 

@Prasad_Das-MSFT 
Thanks and your suggested way is worked perfectly. One disadvantage is we have to make 2 HTTP calls using the joining URL, hope that MS will introduce a single endpoint for this in the future with teams SDK

In case if someone wants to get the attendee emails list, There is an easy way to get the selected meeting attendees list. The above solution (/onlineMeeting with join URL filter) returns the attendees list but not emails. UPNs are there, but UPNs are not always the same as email addresses. If you want to get the email list of a Microsoft team meeting, as @Prasad_Das-MSFT suggested  first call,

GET /chats/{chat-id}?$select=onlineMeetingInfo
and get the 
calendarEventId and use it with below API call

GET me/events/{calendarEventId }  (need Calendars.Read permission)
This will return attendees info with email address and name

1 best response

Accepted Solutions
best response confirmed by priyantha125 (Copper Contributor)
Solution

@priyantha125 

The meetingId exposed by the Teams Client SDK differs from the meeting id exposed in Graph. However, you should be able to get the Graph meeting id by making a call to
 
  1. GET /chats/{chat-id}?$select=onlineMeetingInfo
    https://docs.microsoft.com/en-us/graph/api/chat-get?view=graph-rest-beta&tabs=http#example-4-get-the...
  2. There after use the following request to get the OnlineMeeting resource:
    GET /users/{userId}/onlineMeetings?$filter=joinWebUrl eq '{joinWebUrl}'


    You would get the {chat-id} for #1 from a call into Teams Client SDK.

    Response to #2 will give you the correct Graph OnlineMeetingId in case you want to store a mapping for later.



    Thanks, 

    Prasad Das

    ---------------------------------------------------------------------------------------------- 

    If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate. 

View solution in original post