Access Teams Attendance using RSC permission

Copper Contributor

Objective

When a teams video call finishes, get a list of users who attended the meeting. (ideally with the joined and left times)

 

Approach

In a teams app manifest file you can add Resource-specific consent ‎(‎RSC) Application Permissions:

ChannelMeetingParticipant.Read.GroupRead the participants of this team's channel meetings. - Allows the app to read participant information, including name, role, id, joined and left times, of channel meetings associated with this team, without a signed-in user.
OnlineMeetingParticipant.Read.ChatRead the participants of the meetings associated with this chat. - Allows the app to read participant information, including name, role, id, joined and left times, of meetings associated with this chat, without a signed-in user.

 

Using a teams app with the ChannelMeeting.ReadBasic.Group and OnlineMeeting.ReadBasic.Chat permission I get a notification when a meeting ends.

 

Using:

var meetingInfo = await TeamsInfo.GetMeetingInfoAsync(turnContext);

I can get the: meetingInfo.Details.MsGraphResourceId which gives me a value that looks like: MSpjY2VhZjE3My04MjBk...Truncated...ZWFkLnYy

 

Questions/Help Needed

How do I make use of the RSC permissions granted in the Teams App manifest to now request the participants who attended the meeting? What API call do I need to make? The documentation for this seems lacking?

 

The RSC permission for getting meeting participants is referred to here: https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent but I am unable to find out how I can make use of this permission to make graph calls?

Other comments and posts refer to getting Online Meeting Artifacts (Giving access to recordings, transcripts and attendance report) however this requires the Teams Admin to grant the very broad permission to OnlineMeetingArtifact.Read.All whereas I believe I should be able to do this via permissions granted via RSC which would be granted on a per channel or meeting basis when a user adds the app rather than having access to all meetings. - Also I only want access to the attendees and avoid asking for permissions that give access to meeting recordings which could contain sensitive information.

 

Can you please advise or direct me to where I can find help on how to make use of the ChannelMeetingParticipant.Read.Group and OnlineMeetingParticipant.Read.Chat permission to access the meeting attendees.

 

Many thanks,

Daniel Mitchell

6 Replies

Could you please check this sample and let us know if this helps? Microsoft-Teams-Samples/samples/meetings-attendance-report at main · OfficeDev/Microsoft-Teams-Sampl...

 

Also please note that OnlineMeetingArtifact.Read.All permission is required to get the meeting attendees.

@Meghana-MSFT 

 

Hello. Thank you for your response. The sample you gave is very useful. As you mention this requires the Teams Admin to approve and grant the Graph permission OnlineMeetingArtifact.Read.All - This makes adding the app to Teams a two step process. 1st install the app and then 2nd contact your teams administrator and ask him to give Graph permissions. This graph permission is quite broad giving access to not only the attendance report but also any recordings. Administrators may be weary of doing this.

 

I had hoped I would be able to gain the attendance report using permissions gained via the Teams App manifest file.
e.g.
{

  "version""1.0.1",
  "manifestVersion""1.16",
  [--Truncated--]

  "authorization": {
    "permissions": {
      "orgWide": [],
      "resourceSpecific": [
        {
          "name": "OnlineMeetingParticipant.Read.Chat",
          "type": "Application"
        },
        {
          "name": "ChannelMeetingParticipant.Read.Group",
          "type": "Application"
        }
     ]
  }
}

These two permissions should grant me access to the meeting participants. (Using the permissions via the teams app manifest is also more secure as it will only grant access to teams/channels where the app is installed, and in many cases quicker to install as it will allow a user to add the app and make use of its features without involving the Teams Administrator.) However I am unable to find any documentation or samples on how to make use of these permissions?

 

Regards,

Daniel Mitchell

As per the Graph API doc to get attendanceRecords, https://learn.microsoft.com/en-us/graph/api/attendancerecord-list?view=graph-rest-1.0&tabs=http. It makes use of OnlineMeetingArtifact.Read.All permission and RSC permission are currently not supported here.

If this is the case then what is the purpose of the RSC permission ChannelMeetingParticipant.Read.Group and OnlineMeetingParticipant.Read.Chat?
Thanks

We will check and get back to you. Thank you.

@mrdanielmitchell - Apologies for the delay, we got the below response from engineering team.

 

The purpose of these permissions is to interact with data in a delegated context. In delegated context, data is shared to an app on behalf of a signed-in user, there is no interaction with Graph APIs. This is explained a bit better on this page Overview resource-specific consent in Teams - Teams | Microsoft Learn under sections Types of RSC permissions & RSC-based data access APIs.