You may be asking yourself... Can't you already get attendance reports natively through Teams? Yes. Yes you can. So what's the point of this? Well... There are unique use cases and is meant to be a last ditch option. In my case:
- It's been well past the meeting dates and the attendance reports are no longer available to download.
- The data in the attendance report that's available isn't showing the whole meeting because the meeting had a new session of the meeting start.
- The instructor may have forgotten to get the attendance report and they're not around, at the time, when it needs to be submitted for audit/accreditation reasons.
It's best guess and it doesn't correlate a meeting to a specific class; however, it can get all of the meetings a user organized and get their respective attendees with their join and leave times.
It utilizes Search-UnifiedAuditLog
in the ExchangeOnlineManagement
PowerShell module to get all MeetingDetail
and MeetingParticipantDetail
entries from your tenant's Microsoft 365 Unified Audit Log... Provided you have the necessary license to use it and your user account has the correct permissions to search the audit log.
- PowerShell 7.3
- That means no Windows PowerShell 5.1 support.
ExchangeOnlineManagement
v3.2.0 and higherMicrosoft.Graph
v1.2.8 and higher- I have not tested this against the preview/release candidate releases of the upcoming v2.0.0 release.
- If you don't want to install the meta module, v1.2.8 of
Microsoft.Graph.Authentication
andMicrosoft.Graph.Users
are the exact requirements.
ImportExcel
v7.8.5 or higher
To install those required modules you can run these commands, depending on the version of PowerShellGet
you're using:
# PowerShellGet v2 (Default)
Install-Module -Name "ExchangeOnlineManagement" -MinimumVersion "3.2.0"
Install-Module -Name "Microsoft.Graph" -MinimumVersion "1.2.8" -MaximumVersion "2.99"
Install-Module -Name "ExchangeOnlineManagement" -MinimumVersion "7.8.5"
# PowerShellGet v3 / PSResourceGet
Install-PSResource -Name "ExchangeOnlineManagement" -Version "3.2.0"
Install-PSResource -Name "Microsoft.Graph" -Version "1.2.8"
Install-PSResource -Name "ExchangeOnlineManagement" -Version "7.8.5"
The module is available here on PowerShell Gallery.
Installing it from PowerShell Gallery will depend on which version of the PowerShellGet
version you're using.
Install-Module -Name "SmallsOnline.TeamsAttendance.Pwsh"
Install-PSResource -Name "SmallsOnline.TeamsAttendance.Pwsh"
Download the ZIP artifact from the latest release, extract it, and import it using Import-Module
.
In addition to the requirements listed in the requirements section, these need to be installed on your system:
After cloning this repository with git
, open up a terminal prompt (bash
, zsh
, pwsh
, etc.) and navigate to the cloned directory. Run the following command to build the module:
dotnet msbuild SmallsOnline.TeamsAttendance.proj -target:"BuildPowerShellModule"
The compiled module will be located in ./build/
once it is finished.
This project is licensed under the MIT License.