A private channel in Microsoft Teams is a powerful feature that allows you to create focused, secure spaces for collaboration within a team. Unlike standard channels that are open to all team members, a private channel is accessible only to a select group of individuals within the same team. This makes it perfect for discussions or projects that require privacy or restricted access.
Who can see the Private Channels?
- Team owners can see all private channels in a team.
- Team members can only see those private channels in which they are part of.
What Can Go Wrong with Private Channel?
- By default, any member of a Team can create Private Channels. Team Owners can see the list of available Private Channels in their Teams, but they can’t control Private Channel’s membership, settings and all.
- Each private channel has its own SharePoint site collection optimized for file sharing and fast provisioning. When the Private Channel created unnecessarily, it also creates a new site collection.
- Microsoft is yet to support configuration for legal hold of private channel messages. However legal hold of files shared in private channels is supported.
Admins can restrict the ability to create private channels to specific users to avoid these scenarios.
How to Restrict Private Channel Creation?
As an admin, you can manage the private channels creation using Teams policies. To restrict the creation of private channels, you have the option to use the Microsoft Teams Admin Center (GUI), Graph API, or PowerShell.
While all methods are viable, we recommend using the PowerShell method for greater flexibility. This is because, in the Admin Center, policies can only be applied organization-wide. If you need to apply the policy on a per-user basis, PowerShell is the only way to achieve this.
In this blog, we’ve covered both the GUI and PowerShell methods. For simplicity and ease of use, we focus on the PowerShell approach over Graph API.
- Method 1: Manage Private Channel using PowerShell script
- Method 2: Manage Private Channel creation through Microsoft Teams Admin Center
Method 1: Manage Private Channel Using PowerShell Script:
We have developed easy to use PowerShell script which can do following actions.
- Manage Private Channel Creation
- Private Channel Reporting
Download Script: PrivateChannelManagement.ps1
You can also download from github
Script Execution Steps:
Step 1: Download script from above mentioned link.
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 accounts.
1 |
./PrivateChannelManagement.ps1 |
Method 2: Execute script using certificate-based authentication (CBA). This method is scheduler friendly.
1 |
./PrivateChannelManagement.ps1 -TenantId <TenantId> -AppId <AppId> -CertificateThumbPrint <CertThumbPrint> |
Method 3: Execute script by explicitly mentioning credential (Scheduler friendly) and required action
1 |
./PrivateChannelManagement.ps1 -Action 7 -UserName Admin@Contoso.com -Password XXXX |
Unlock the Full Potential of this Script
1. Allow Private Channel Creation Organization wide:
You can allow all users available in your organization to create Private Channel by updating Global policy.
To allow Private Channel creation org-wide, run the script and select required action from the menu or run the below code directly. For example,
Or you can directly pass the Action during script execution as shown below.
1 |
./PrivateChannelManagement.ps1 - Action 1 |
2. Disable Private Channel Creation Organization wide:
You can block Private Channel creation for all users available in your organization by updating ‘AllowPrivateChannelCreation’ to $false in Global policy.
To restrict Private Channel creation org-wide, run the script and select required action from the menu or run the below code directly.
1 |
./PrivateChannelManagement.ps1 - Action 2 |
3. Allow Single User to Create Private Channel:
If you have a policy to allow private channels creation, you can run the Grant-CsTeamsChannelsPolicy cmdlet with policy name and individual user.
To allow a user to create Private Channel, run the below code
1 |
./PrivateChannelManagement.ps1 -Action 3 |
4. Block Private Channel Creation for a User:
To restrict Private Channel creation for a user, run the below code and enter the user’s UPN when it prompt.
1 |
./PrivateChannelManagement.ps1 -Action 4 |
5. Allow Private Channel Creation for Bulk Users using CSV Import:
You can use CSV/txt file to import bulk users.
The file must follow the format below: UPN separated by new line without header.
Run the script as follows to allow Private Channel creation for bulk users.
1 |
./PrivateChannelManagement.ps1 -Action 5 |
6. Restrict Private Channel Creation for Bulk Users using CSV Import:
To restrict Private Channel creation for Bulk users, run the script and then select required action from the menu or run the below code directly.
1 |
./PrivateChannelManagement.ps1 - Action 6 |
7. Export All Private Channel Report:
This report lists all Private Channels available in your organization. All Private Channels report contains Teams name and Private Channels Name.
1 |
./PrivateChannelManagement.ps1 - Action 7 |
Sample Output:
8. Export all Private Channels in the Specific Team:
If you are owner of the Team, you may in the situation to get a list of all Private Channels in the Team. To ease your work, we have a pre-built report for you.
Run the below cmdlet to get Private Channel report of a specific Team.
1 |
./PrivateChannelManagement.ps1 -Action 8 |
Sample Output:
9. Export All Private Channels’ Members and Owners Report:
To get a list of Private Channels’ members and Owners report, run the below cmdlet.
1 |
./PrivateChannelManagement.ps1 -Action 9 |
Sample Output:
The exported report will contain all the private channels and their members & owners. You can also run the dedicated PowerShell script to generate 7 detailed Private Channel membership reports.
10. Export Single Private Channel’s Members and Owners Report:
To get a list of all members and owners of a Private Channel, run the below cmdlet.
1 |
./PrivateChannelManagement.ps1 -Action 10 |
Sample Output:
Apart from generating membership report, it’s also important to monitor private channel membership changes to effectively track private channel activities.
Method 2: Manage Private Channel creation through Microsoft Teams Admin Center
Step 1: In Microsoft Teams Admin Center, go to Teams –> Teams Policy.
Step 2: Select already available policy or create a new policy.
Step 3: Two options will be shown.
- Discover private teams – Turn on this setting to allow users to discover private teams in search results and in the team gallery.
- Create a private channel – Turn off this setting to restrict Private Channel creation.
Step 4: And how do we change this, per user?
The Grant-CsTeamsChannelsPolicy allows you to assign specific policies to individual users in the tenant. If you have a policy to block private channels creation, you can run the Grant-CsTeamsChannelsPolicy cmdlet with policy name and individual user.
1 |
Grant-CsTeamsChannelsPolicy -PolicyName PrivateTeamsPolicy –Identity admin@Contoso.com |
Conclusion:
There is no doubt that Private Channels are the most required addition to the Microsoft Teams. While planning for Private channels, just keep in mind following things.
- Each Team can have maximum of 30 Private Channels.
- Each Private Channel can have maximum of 250 members in it.
I hope this blog will help you to manage Private Channels. If you have any queries, you can mention them in the comment section.