Pages Menu
TwitterRssFacebook

Posted by on Apr 11, 2022 in Development, Microsoft Teams | 0 comments

New and Updated Graph Reporting APIs for Microsoft Teams activity

New and Updated Graph Reporting APIs for Microsoft Teams activity

Some of the existing reporting API endpoints for Microsoft Teams activity have been updated to include additional details including audio, video and screen-sharing durations and meeting actions.

Which reports have been updated?

Get Activity Counts

The Get Activity Counts report provides a tenant-wide overview of Teams activity of licensed Teams users and has been updated with new columns for:

  • Number of messages posted in the reporting period
  • Number of replies in the reporting period
  • Total audio duration in the reporting period
  • Total video duration in the reporting period
  • Total screen share duration in the reporting period
  • Meetings organised in the reporting period
  • Meetings attended in the reporting period

Get Activity Total Counts

The Get Activity Total Counts report is similar to the previous report but includes non-licensed users. It also also been updated with new columns for:

  • Number of messages posted in the reporting period
  • Number of replies in the reporting period
  • Total audio duration in the reporting period
  • Total video duration in the reporting period
  • Total screen share duration in the reporting period
  • Meetings organised in the reporting period
  • Meetings attended in the reporting period

Get User Detail

The Get User Detail report provides detailed user-level reporting on Teams activity. To support Shared Channels, this report now includes details of the user tenant as well as their ID. New columns in this report are:

  • Tenant Display Name
  • Shared Channel Tenant Display Names
  • Number of messages posted in the reporting period
  • Number of replies sent in the reporting period
  • Number of urgent messages sent in the reporting period

Which reports are new?

Get total distribution activity counts

The Get total distribution activity counts is a new report that returns data similar to the Get Activity Total Counts report, but aggregated in a different way. Rather than providing a set of values for each day in the reporting period, this report provides a single set of values for the entire period. It takes a period parameter of 7, 30, 90 and 180 days and outputs in either JSON or CSV. It has the following columns:

  • Team chat messages posted in the reporting period
  • Private chat messages posted in the reporting period
  • Calls in the reporting period
  • Meetings in the reporting period
  • Meetings organized in the reporting period
  • Meetings attended in the reporting period
  • Audio duration in the reporting period
  • Video duration in the reporting period
  • Screen share duration in the reporting period
  • Post messages in the reporting period
  • Reply messages in the reporting period
  • Report period in the reporting period

Example output from this report. Notice that regardless of how many days in the reporting period, a single set of results is returned, aggregated the period:


{
  "@odata.context": "https://graph.microsoft.com/beta/getTeamsUserActivityTotalDistributionCounts(period='D7')", 
  "value": [
      "reportRefreshDate": "2022-04-08", 
      "userCounts"
        {
          "reportPeriod":7,
          "teamChatMessages": 26, 
          "privateChatMessages": 17, 
          "calls": 4, 
          "meetings": 0, 
          "meetingsOrganized": 0,
          "meetingsAttended": 0,
          "audioDuration": "P16DT8H9M41S",
          "videoDuration": "P11DT16H37M51S",
          "screenShareDuration": "P11DT17H16M28S",
          "postMessages": 1,
          "replyMessages": 1
    }
  ]
}

The durations are returned in the ISO8601 Duration format, which may be somewhat unfamiliar to developers.

Right now all these changes are only reflected in the /beta version of the reports.

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.