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.

https://teams.microsoft.com/l/team/19%xxxxxxxxxxxxxxxxx7%40thread.skype/conversations?groupId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&tenantId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

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

           GET https://graph.microsoft.com/teams/<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.

            GET https://graph.microsoft.com/teams/<group_id>/channels/<channel_id>/filesFolder

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

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Apply Sensitivity labels to SharePoint site, Microsoft Teams & Microsoft 365 groups – Microsoft Purview

Sensitivity labels can be applied to individual documents and emails to classify content in general. In addition to that, now you can apply sensitivity labels at container level – SharePoint site, Microsoft Teams and Microsoft 365 groups. Below settings can be controlled by creating a classification label for a Site or Group. Privacy: A Team […]

Read More

Build your own Custom Microsoft List templates

Microsoft Lists are everywhere! It is available now in preview with MSA account. Great way to organize your grocery trips, home projects or any personal lists. Check it out here. Moving on to the topic, Microsoft did a great job by providing pre-built templates. There are 8 of them available as of today. Any of […]

Read More

Viewership Retention chart for Microsoft Stream

Microsoft introduced a new feature called Viewership retention chart for Stream videos stored in OneDrive & SharePoint. It helps Stream content creators to better understand their audience and  provide relevant information. This update is part of Roadmap item to help improve viewership retention and to see which parts of video is watched.  https://www.microsoft.com/en-ww/microsoft-365/roadmap?filters=&searchterms=85643 By the […]

Read More