Recently, Microsoft Teams’ usage has been increasing tremendously. This increased the need of generating reports on Microsoft Teams on daily basis. Most admins and executives want to prepare reports on the number of meetings between users, meeting participants, call times, and more. But Microsoft is yet to provide the cmdlets or API to extract those data from Office 365.
Secondly, managing Teams membership and auditing teams membership changes is the next big task. You can manage Teams through the Microsoft Teams admin center. But, getting reports on Channels in the Teams, Teams members, Teams owners, private channel members through the admin center is a bit difficult task. Because you need to navigate to multiple pages to view a single report, and there is no option to export the result. Here, Microsoft Teams PowerShell module comes into play.
By using Teams PowerShell cmdlets like Get-Team, Get-TeamChannel, Get-TeamUser, and Get-TeamChannelUser, you can get your organization’s Teams information. But how will you get nicely formatted report? Don’t worry! We have created an All-in-One PowerShell script to export Microsoft Teams reports as CSV files. A single script can generate eight different Teams report.
- A single script allows you to generate eight different Teams reports.
- The script can be executed with MFA enabled accounts too.
- Exports output to CSV.
- Automatically installs Microsoft Teams PowerShell module (if not installed already) upon your confirmation.
- The script is scheduler friendly. I.e., Credential can be passed as a parameter instead of saving inside the script.
- The script supports Certificate-based Authentication (CBA).
Download Script: TeamsReports.ps1
Microsoft Teams Reporting using PowerShell Script:
As said earlier, you can use this Microsoft Teams PowerShell report for multiple use-cases. I.e., you can generate multiple Microsoft Teams reports using this script. We have listed a few significant reports here.
Microsoft Teams Reporting
Teams Channel Reporting
Private Channel Management and Reporting
You can download the script from https://blog.admindroid.com/managing-private-channels-in-microsoft-teams/
Shared Channels and Membership Reports
You can download the script from https://o365reports.com/2023/02/28/ms-teams-shared-channel-membership-report/
Teams without Owner (Orphaned teams)
You can download the script from https://o365reports.com/2022/01/05/finding-and-managing-microsoft-teams-without-owner
Microsoft Teams Reporting Script – Execution Steps:
Step 1: Download the script.
Step 2: Start Windows PowerShell as Administrator.
Step 3: To run this script, you can choose any one of the below methods.
Method 1: Execute script with MFA and non-MFA account.
Method 2: Execute script by explicitly mentioning credential (Scheduler friendly) and required action.
./TeamsReports.ps1 -Action 1 -UserName Admin@Contoso.com -Password XXXX
Method 3: Run the script using certificates.
When you want to run the script unattended, you can choose this method. To use certificates, you must register the app in Azure AD and connect to MS Graph using certificate.
./TeamsReports.ps1 -TenantId <TenantId> -ApplicationId <AppId> -CertificateThumbprint <CertThumbprint>
You can use either a CA certificate or create a self-signed SSL certificate. Most admins prefer self-signed certificates for internal use.
Note: The output file will be stored in current working directory.
Unlock the Full Potential of this Script
Using this PowerShell script, you can get Microsoft Teams details. We have given an example to generate each report.
Export All Microsoft Teams Information:
To get a list of all teams in your organization, run the script and select the required action from the menu or run the below code directly.
./TeamsReports.ps1 -Action 1
Using this teams report, you can find orphaned teams I.e., teams without an owner.
The exported All Teams Report contains Teams Name, Teams Type, Mail Nick Name, Description, Archived Status, Channel Count, Teams Members Count, and Teams Owners Count.
If you find it challenging to analyze this teams report due to irrelevant teams created by users, consider implementing the restriction on team creations.
Get All Microsoft Teams’ Members and Owners Report:
This report exports all teams’ membership and ownership to the CSV file. To view members and owners report, run the script and select the required action from the menu or run the below code directly.
./TeamsReports.ps1 -Action 2
The exported All Teams’ Members and Owners Report contains Teams Name, Member Name, Member Email, and Role.
List All Members and Owners in a Specific Team:
To export the list of teams’ members, run the script and select the required action from the menu or run the below code directly.
./TeamsReports.ps1 -Action 3
The exported Teams Participants Report contains Member Name, Member Email, and Role. The role includes owner, member, and guest (I.e., external users).
Export All Teams and Owners to CSV:
To list teams and owners, run the PowerShell script and select the required action from the menu or run the below code directly.
./TeamsReports.ps1 -Action 4
All Teams Owner Report contains Teams Name, Owner Name, and Owner Email Address.
Export Teams Owner Report for a Specific Team:
To export all owners from the specific team, run the script and select the required action from the menu or run the below code directly.
./TeamsReports.ps1 -Action 5
The exported Teams Owner Report contains Owner Name and Owner Email.
List all Channels in the Organization – Tenant wide CSV Report:
To export all channels in your organization, run the script and select the required action from the menu or run the below code directly.
./TeamsReports.ps1 -Action 6
The exported All Channels Report shows details about Teams Name, Channel Name, Channel Visibility, Description, Total Members Count, and Owners Count. If you want to track the recently created channels, make use of this PowerShell script to audit MS Teams channel creations.
Export the list of Channels in the Specific Team:
To retrieve all channels in the specific teams, run the script and select the required action from the menu or run the below code directly.
./TeamsReports.ps1 -Action 7
Teams Channel Report contains Teams Name, Channel Name, Membership Type, Description, Owner Count, and Total Members Count.
Microsoft Teams’ Channel Members Report:
You can generate this report to get a list of channel members and owners. To export channel membership, run the script and select the required action from the menu or run the below code directly.
./TeamsReports.ps1 -Action 8
This teams report shows channel members with Teams Name, Channel name, Member Name, Member Email Address, and Role.
You can also use this report to export private channel members and owners. Else, you can use dedicated PowerShell script for managing and reporting Private Channels.
Get More Detailed Microsoft Teams Reports:
If you want to get more detailed Microsoft Teams reports on
- Teams Membership
- Teams members
- Channel members
- Private channel members
- External members
- Teams and channel membership changes
- Teams activity
- Teams user activity report
- Overall Teams activities by user
- Inactive Teams users
- By last team chat
- By last private chat
- By last call activity
- By last meeting activity
- Teams usage Report
- Teams device usage report
- Daily Teams activity
- Daily active users by activity
- External user activities in Microsoft Teams
- Teams settings
- Teams analytics
you can take a look at AdminDroid Microsoft 365 reporting and auditing tool.
Additionally, AdminDroid provides 1800+ pre-built reports and 30 smart visually appealing dashboards to know about your Office 365 environment at a glance. This tool provides reports on Office 365 reporting, auditing, analytics, usage statistics, security & compliance, etc.
Besides, AdminDroid provides over 120+ reports and a handful of dashboards completely for free. It includes reports on Users, Licenses, Groups, Group Members, Devices, Login Activities, Password Changes, License Changes, and more. The free edition doesn’t have any restrictions in reporting functionalities such as customization, scheduling, and exporting. For your Azure AD reporting and auditing needs, you can download Free Office 365 reporting tool by AdminDroid and see how it helps for you.
I hope this blog is useful to generate Microsoft Teams report using PowerShell. We have planned to prepare reports on Teams meeting, attendance, call duration, meeting participants once the Microsoft provides API or PowerShell cmdlets. If you want to add more Teams and Channels reports, let us know through the comment section.