Find all Private channels in a Team

Private channel in a team is an access controlled space available only for Owners and Members of the channel. Guests can be added to private channel as long as they are already member of the team. This should do for a quick intro about private channels. Well, the point of this post is it not explain about private channels. 

Aim of this post is to find an easy way for admins to figure out how many private channels are created in a team and how to find their SharePoint URLs. Every private channel has its own SharePoint site in the backend. If you are someone working in SharePoint Online & Teams space, by now you are already familiar with this problem. Every team is not accessible for admin unless they are a member/owner for it. I mean as admin you get to see the Team name and who the Members/Owners and sharing settings. But there is zero visibility to channels or content in it. Forget about the private channels, admins doesn’t have enough visibility to Teams in the first place.

Private channels Limitation: 

There is a 30 max. private channel limitation per team. This count includes deleted channels in the past 30 days. Since each private channel gets its own SharePoint site in the backend, when a channel is deleted, respective site will be deleted and sent to recycle bin. Deleted channels can be restored  within 30 days. During that time span, it stays in recycle bin and will be counted towards the 30 private channel max. limit.

So with limitation set aside, how do an admin get a list of private channels in a team? Graph to the rescue! 

Go the Graph explorer Graph Explorer . Sign in and execute below APIs.

  • First step is to get the group ID of the team. Easiest approach is using PowerShell Get-Team command. If you are a member of team, you can easily get the ID by selecting ellipses (3 dots) next to team name and choosing ‘Get link to team‘.

Get link to team

Link generated will contain 3 IDs. Channel Id, Group ID & Tenant ID.

  • Once you group ID, Get list of all private channel ID’s by executing below API call in Graph explorer.

           GET<group_id>/channels?$filter=membershipType eq ‘private’

           <group_id> is the Group Id of the team from first step.

  • By now you should have list of all channel ID’s. Next step is to execute below API call for each channel. Response for this query will include SharePoint URL for private channel.


More details on executing above Graph queries and sample responses are available at Manage the life cycle of private channels in Microsoft Teams