Microsoft Office 365 Teams

Microsoft Office 365 Teams

This template shows information about Office 365 Teams and includes the following Component:

  • Number of Calls
  • Number of Meetings
  • Number of Chat Messages
  • Number of daily users by device type
    1. Web
    2. Windows Phone + Windows
    3. Android Phone, 
    4. iOS
    5. Mac

Prerequisites:

  • The details collected as part of above steps should be passed as Arguments to Monitors in below format/precedence

client_id=<Value>, TenantID=<Value>, client_secret=<Value>

Credentials:

  • The user should have SAM Administrator permissions
  • Pass Client ID and Password as Arguments to Monitors (Argument details mentioned in Pre-requisite)

MONITORED COMPONENTS

  • Number of Calls

Get the number of Microsoft Teams activities.

The activity types value given is calls.

Argument: Client ID, Tenant ID, Client Password

Format: client_id=<Value>, TenantID=<Value>, client_secret=<Value>

Statistic Unit: Number

  • Number of Meetings

Get the number of Microsoft Teams activities.

The activity types value given is Meetings.

Argument: Client ID, Tenant ID, Client Password

Format: client_id=<Value>, TenantID=<Value>, client_secret=<Value>

Statistic Unit: Number

  • Number of Chat Messages

Get the number of Microsoft Teams activities.

The activity types value given is Chat Message (Private + team)

Argument: Client ID, Tenant ID, Client Password

Format: client_id=<Value>, TenantID=<Value>, client_secret=<Value>

Statistic Unit: Number

  • Number of Daily Web User

Get the number of Microsoft Teams daily unique Web users

Argument: Client ID, Tenant ID, Client Password

Format: client_id=<Value>, TenantID=<Value>, client_secret=<Value>

Statistic Unit: Number

  • Number of Daily Windows User 

Get the number of Microsoft Teams daily unique Windows users (Windows Device+ Windows Phone)

Argument: Client ID, Tenant ID, Client Password

Format: client_id=<Value>, TenantID=<Value>, client_secret=<Value>

Statistic Unit: Number

  • Number of Daily Android Phone User 

Get the number of Microsoft Teams daily unique Android Phone users

Argument: Client ID, Tenant ID, Client Password

Format: client_id=<Value>, TenantID=<Value>, client_secret=<Value>

Statistic Unit: Number

  • Number of Daily iOS User

Get the number of Microsoft Teams daily unique iOS users

Argument: Client ID, Tenant ID, Client Password

Format: client_id=<Value>, TenantID=<Value>, client_secret=<Value>

Statistic Unit: Number

  • Number of Daily Mac User

Get the number of Microsoft Teams daily unique Mac users

Argument: Client ID, Tenant ID, Client Password

Format: client_id=<Value>, TenantID=<Value>, client_secret=<Value>

Statistic Unit: Number

Troubleshooting steps

Detail troubleshooting steps (common for template)

Use UPN format (username@domain) and not domain\username format to enter credentials. Also, a service account for Exchange Web Services is recommended to avoid authentication issues when passwords are updated.

Portions of this document were originally created by and are excerpted from the following sources:

https://docs.microsoft.com/en-us/graph/overview?toc=./toc.json&view=graph-rest-1.0

https://docs.microsoft.com/en-us/graph/api/resources/report?view=graph-rest-1.0

Last updated: <Date updated>



Anonymous

Top Comments

Parents
  • I have this working but there needed to be a few script modifications to get it to work properly for a few of the components. First, the write-host for the token needs to be commented out. Then on a couple of the components; Number of Chat Messages and Windows Phone + Windows, I think, there needs to be a data type change from string to integer so you can sum the parts and some syntax changes for text presentation in the message at least on the powershell version I am using (win 2016). I did it this way; 

    for chat messages;

    foreach ($res in $Response) {
    $tc = $res.'Team Chat Messages'
    $pc = $res.'Private Chat Messages'
    $tc = $tc -as [int]
    $pc = $pc -as [int]
    $statistic = $tc + $pc
    $message = "Team Chat Messages = $($res.'Team Chat Messages'), Private Chat Messages = $($res.'Private Chat Messages')"
    break;
    }

    and for windows users;

    foreach ($res in $Response) {
    $wp = $res.'Windows Phone'
    $w = $res.'Windows'
    $wp = $wp -as [int]
    $w = $w -as [int]
    $statistic = $wp + $w
    break;
    }

    if($statistic -eq 0) {
    $message = "Number of Teams daily users on Windows : $statistic"
    }
    else {
    $message = "Number of Teams daily users on Windows : $statistic [Windows Phone : $($res.'Windows Phone'), Other Windows Device : $($res.'Windows')]"
    }

    Guess I could have used the reformatted variables in the messages but it is working. With the appropriate graph api access setup and arguments as described it works well now with accurate readable outputs as intended.

    Thanks for the great head start on getting this monitoring working. Now to figure out what the admins really want and need to see.

Comment
  • I have this working but there needed to be a few script modifications to get it to work properly for a few of the components. First, the write-host for the token needs to be commented out. Then on a couple of the components; Number of Chat Messages and Windows Phone + Windows, I think, there needs to be a data type change from string to integer so you can sum the parts and some syntax changes for text presentation in the message at least on the powershell version I am using (win 2016). I did it this way; 

    for chat messages;

    foreach ($res in $Response) {
    $tc = $res.'Team Chat Messages'
    $pc = $res.'Private Chat Messages'
    $tc = $tc -as [int]
    $pc = $pc -as [int]
    $statistic = $tc + $pc
    $message = "Team Chat Messages = $($res.'Team Chat Messages'), Private Chat Messages = $($res.'Private Chat Messages')"
    break;
    }

    and for windows users;

    foreach ($res in $Response) {
    $wp = $res.'Windows Phone'
    $w = $res.'Windows'
    $wp = $wp -as [int]
    $w = $w -as [int]
    $statistic = $wp + $w
    break;
    }

    if($statistic -eq 0) {
    $message = "Number of Teams daily users on Windows : $statistic"
    }
    else {
    $message = "Number of Teams daily users on Windows : $statistic [Windows Phone : $($res.'Windows Phone'), Other Windows Device : $($res.'Windows')]"
    }

    Guess I could have used the reformatted variables in the messages but it is working. With the appropriate graph api access setup and arguments as described it works well now with accurate readable outputs as intended.

    Thanks for the great head start on getting this monitoring working. Now to figure out what the admins really want and need to see.

Children
No Data