Microsoft Teams has three different types of logs, which get stored on different locations.
Web Logs
Consists of most Teams client activity.
- Windows: to capture logs, open Teams and press CTRL+ALT+SHIFT+1 in the client, and the logs will be downloaded to %downloads%\MSTeams Diagnostics Log.txt
- MAC: press Command+Option+SHIFT+1 in client to download logs to Downloads\MSTeams Diagnostics Log.txt
Desktop Logs
This log has most information about framework and bootstrapping information, app bootstrap process, plugin initialization, update management and SSO/ADAL Sign in information.
- Windows: %appdata%\Microsoft\Teams\logs.txt
- MAC: ~/Library/Application Support/Microsoft/Teams/logs.txt
Media Stack Logs
This log has media connectivity related information.
- Windows: %appdata%\Microsoft\Teams\media-stack
- MAC: ~/Library/Application Support/Microsoft/Teams/media-stack
Microsoft Teams Mobile client (iOS):
To collect log on Teams mobile client, open Microsoft Teams app -> Settings -> Report an issue. A new email will open with log.txt attached.
This script uses Graph API to gather statistics regarding Microsoft Teams.
IMPORTANT:
- You will need to have, or create, an 'app registration' in Azure and create a 'client secret';
- The app registration will need the following API permissions to Graph API: 'Group.Read.All' and 'User.Read.All', both of type 'Application'.
The script gathers and exports the following stats for each team:
- Team: the display name of the team;
- Description: the team's description as set by its owner;
- Email: the team's email address;
- CreatedOn: the date and time the team was created;
- RenewedOn: the date and time when the team was renewed;
- Visibility: if the team is 'Private' or 'Public';
- Owners: the number of owners;
- OwnerNames: the display name of all the team's owners;
- Members: the number of members;
- Channels: the number of channels for the team;
- ChannelNames: the display name of all the team's channels.
To call the script, simply run:
.\GetTeamsDetails.ps1