Channels in Microsoft Teams are the heartbeat of collaboration, designated to help teams organize conversations, files, and tasks around specific topics or projects. However, they also come with challenges—especially when external members are involved. Imagine sensitive project details, strategic plans, or client data being accessible to users outside your organization without your knowledge. Situations like this highlight why staying informed about external members in team channels is essential.
In this guide, we will show you how to identify all team channels with external users. Let’s dive in and ensure your external collaboration stays seamless and secure.
How to Find All Team Channels with External Members in Microsoft 365
You can use the below approaches to list all teams channels with external users.
- Get all team channels with external members through the Teams admin center
- List all guest users in the Microsoft teams channel using PowerShell
Get Team Channels with External Members through the Teams Admin Center
To view the guest users in Microsoft 365 teams channel, follow the steps below.
- Sign in to the Microsoft Teams admin center.
- Navigate to Teams → Manage Teams.
- Select a team, go to Channels tab and click on the desired channel to find external access.
- The external members in teams channels are listed as Guest under the Role column.
This process must be repeated for each team, making it inefficient and tedious for organizations managing many teams.
Note: This method is not suitable for shared channels since guest members are not distinguished as guests in their membership details.
List all Guest Users in the Teams Channel Using PowerShell
PowerShell provides an efficient way to locate external participants in specific Teams channels. The Get-MgTeamChannelMember cmdlet retrieves channel members and helps identify external users within a particular team channel.
1 |
Get-MgTeamChannelMember -TeamId <TeamId> -ChannelId <ChannelId> | Where-Object { $_.Roles -contains "guest" } |
Replace <TeamId> and <ChannelId> with the ID of the respective team and channel to retrieve the external members. This PowerShell cmdlet also does not work for shared channels, as shared channel memberships do not distinguish external users as guests, unlike regular team channels.
Additionally, running this cmdlet for each channel available team is inefficient and time-consuming, especially in larger environments.
To address this gap, we’ve developed a custom PowerShell script that quickly identifies external collaboration in Teams channels. It streamlines the process and gives instant visibility into which channels have external users along with more details.
Download Script: TeamsChannelsWithExternalUsers.ps1
Script Highlights
- This script exports 2 CSV files: a detailed report with details of external users in channels and a summary report with guest user counts in all channels.
- Exports external users across all Teams channel types, such as private, shared, and standard.
- Exports all team channels an external user is a member of.
- Automatically install the Microsoft Graph PowerShell module (if not installed already) upon your confirmation.
- The script can be executed with an MFA-enabled account too.
- Supports Certificate-based Authentication too.
- The script is scheduler friendly.
Team Channels with Guest Users Report – Sample Output
Upon execution, the PowerShell script will generate, and export two reports as follows.
Detailed report: Teams Channels and their external user details
This script lists all the team channels a guest or external user is a member of along with key attributes like Teams Name, Channel Name, Membership Type, External Member Name, External Member Email, and External Member ID.
Summary report: Teams Channels and their guest users count
This script exports all external members in teams channels along with attributes like Team Name, Team ID, Channel Name, Channel ID, Channel Type, External Members, and External Members Count.
Export Microsoft Teams Channels with Guest Users Report – Script Execution Steps
- Download the script.
- Start the Windows PowerShell.
- Select any of the methods provided to execute the script.
Method 1: Execute the script with an MFA or non-MFA account.
1 |
.\FindTeamsChannelsWithExternalMembers.ps1 |
This script gets all Teams channels with guest/external users in Microsoft 365. With this report, you can identify unauthorized external members in all teams channels and ensure a secure external collaboration by restricting essential settings of external users in Microsoft Teams.
Method 2: Execute the script using certificate-based authentication.
To enable certificate-based authentication, you need to register the app in Entra ID which helps you connect Microsoft Graph PowerShell.
1 |
.\FindTeamsChannelsWithExternalMembers.ps1 -TenantId <TenantId> -ClientId <ClientId> -CertificateThumbprint <CertificateThumbprint> |
Depending on your requirements, you can create a self-signed certificate.
Tailor the Script to Your Needs!
This script comes with filters to match various requirements. Learn how to customize it to suit your goals:
- List all channels where an external user is a member
- Get all guest users in private channels
- List all external participants in shared channels
- Identify all standard team channels with guest users
- Find all external users in a specific Teams channel
- View external users in teams based on channels
1. List All Channels where an External User is a Member
By default, the script lists all the channels with external users. However, if you want to focus on the channel membership of a specific external user, you can use the -MemberUPN parameter. This filter helps you to find all channels an external user is a member of.
1 |
.\FindTeamsChannelsWithExternalMembers.ps1 -MemberUPN andreo@contoso.com |
This generates a report listing all Teams channels where Andreo is a member.
Tip: You can also check all the teams an external user is a member of to monitor access and ensure compliance.
2. Get All Guest Users in Private Channels
Private team channels are typically used to share critical information intended for a selected group of members in a team. Identifying all external members in these channels is essential to prevent sensitive data from being exposed to people outside your organization.
To find all external users in private Teams channels, run the script with -ChannelType param as shown below.
1 |
.\FindTeamsChannelsWithExternalMembers.ps1 -ChannelType Private |
While this protects confidential information from unauthorized external access, it’s also important to manage internal access. This is where the private channel membership report comes in. By carefully managing access, you can ensure that both external and internal users have access only to the information they need.
3. List All External Participants in Shared Channels
Microsoft introduced shared team channels to minimize unnecessary team creation, but this flexibility also brings challenges. Adding external users to a shared channel doesn’t require them to be a member of the team. This means that people who aren’t part of the team can still access shared channels, making it crucial to track these users individually.
Run the script as below to get all external users in shared channels in Microsoft Teams.
1 |
.\FindTeamsChannelsWithExternalMembers.ps1 -ChannelType Shared |
Tip: To keep external collaboration in control, audit the shared channel creation and membership regularly and remove unintended users from channel.
4. Identify All Standard Team Channels with Guest Users
By default, all external members in Microsoft Teams are automatically added as members of the team’s standard channels. This automatic inclusion makes it essential to track standard channel membership to ensure only authorized users have access to sensitive information and discussions within those channels.
To find all guest users in standard channels in Microsoft Teams, execute the script as below.
1 |
.\FindTeamsChannelsWithExternalMembers.ps1 -ChannelType Standard |
5. Find All External Users in a Specific Teams Channel
Identifying external members in a specific Teams channel is crucial for maintaining security and control. By identifying unauthorized external users, you can remove their membership from respective channels.
You can use the parameters -TeamName and -ChannelName to find the guest users in a channel.
1 |
.\FindTeamsChannelsWithExternalMembers.ps1 -TeamName “Marketing” -ChannelName “Team Leads” |
This generates a report that lists all external members in the Team Leads channel within the Marketing team.
6. View External Users in Teams Based on Channels
Identifying external users across all channels of a Microsoft Team is crucial for maintaining control over your organization’s data and communications. It ensures you can quickly spot security risks, manage guest access, and safeguard sensitive information.
Execute the PowerShell method as below to list all guest/external users in the channels of a specific team irrespective of the type.
1 |
.\FindTeamsChannelsWithExternalMembers.ps1 -TeamName “Marketing” |
This format generates a report that lists all external members across every channel in the Marketing team.
Tip: Export all Microsoft Teams with their members and owners to keep an eye on teams participants details.
We hope this guide helps you easily track all Teams channels with external members using PowerShell. If you have any questions, feel free to drop them in the comments section!