How to Find Teams Channels With a Wiki Tab

Preparing for Teams Wiki to Move to OneNote

Updated 26 January 2023

In July 2022, Microsoft announced that they would stop the automatic provisioning of a wiki tab for new Teams channels. On 11 January 2023, Microsoft followed up with news of the retirement of the Teams wiki app in February 2023 (MC496248). OneNote is the replacement app and Microsoft plans to deliver an app to migrate wiki content to OneNote notebooks stored in SharePoint Online. The wiki content is already in SharePoint Online, so the migration moves whatever’s in the wiki to the default shared OneNote notebook. Once the migration finishes, Teams locks the wiki, and users work with OneNote from that point.

The migration app is due to roll out in mid-February. Eventually, Microsoft plans to remove the wiki app and tab from Teams.

The Need to Find Wikis

The reaction to Microsoft’s announcement has been positive. OneNote is a more functional application, and the Teams wiki never found much favor with customers. Although the change is good, some up-front work is necessary to prepare for the transition. One obvious question is what Teams channels have a wiki. The natural follow-up is to ask if any wikis contain something worth migrating.

Assessing the worth and importance of wiki content is not something that’s easy to automate. You could scan the SharePoint Online site and examine the date of the latest update for the wiki files to conclude if the wiki is active. Measuring what might be in the wiki is another matter. Beauty is very much in the eye of the beholder and what appears to be someone else’s rubbish might be critically important to them. But we can discover which Teams channels have wiki tabs and report that data to use as a guide to wiki migration.

Several years ago, I wrote a PowerShell script that uses Graph API requests to report the tabs and applications used by Teams channels. I took the code and amended it to generate a wiki report and replaced the Graph API requests with cmdlets from the Microsoft Graph PowerShell SDK to allow the script to run without needing to create a registered Azure AD app. Of course, if you want to, you can amend the original code and run it with a registered app. That’s an exercise for the reader.

Graph Documentation Improvements

Apart from not needing a registered app, using the Microsoft Graph PowerShell SDK illustrates how broadly the SDK extends. Microsoft is gradually updating Graph documentation to include PowerShell examples that feature SDK cmdlets. For instance, the Get channel API returns details of a channel in a team. Its examples include how to use the Get-MgTeamChannel cmdlet.

Another piece of essential information found in the Graph documentation is the application permission needed to run a request (or its matching cmdlet), like the ChannelSettings.Read.All permission needed to fetch channel settings. See this article for more information about figuring out Graph permissions.

Generating a Teams Channels with Wiki Report

Getting back to finding Teams wikis, the steps are simple:

  • Find all teams with the Get-MgTeam cmdlet. It’s critical to use the Select-MgProfile cmdlet to attach to the Graph beta endpoint because Get-MgTeam doesn’t support fetching all teams with the V1.0 endpoint.
  • For each team, find all channels with the Get-MgTeamChannel cmdlet.
  • For each channel, examine the tabs with the Get-TeamChannelTab cmdlet and collect information.
  • Examine each tab. If it’s a wiki tab, fetch details of the tab using some data exposed by the Get Tab Graph API (using the Get-MgTeamChannelTab cmdlet). For most wiki tabs, this returns a configuration property that holds a ‘hasContent’ value if anyone has edited the wiki. Some older wiki tabs don’t return a configuration property.
  • For wiki tabs with content, find the team owners because they are the best people to check the wiki to decide if it should be migrated to OneNote.
  • Generate the report of Teams wikis for checking. Figure 1 shows the output from the PowerShell list, which the code also saves to a CSV file. If you want something nicer, consider exporting to an Excel worksheet.

The script I used to create the report shown in Figure 1 is available from GitHub. Use the latest version from 26 January 2023 or later.

Figure 1: Reporting Teams channels with a wiki tab

The script is pure PowerShell so it’s easy to change to meet individual requirements. Have fun tracking down those pesky Wikis!


Make sure that you’re not surprised about changes that appear inside Office 365 applications by subscribing to the Office 365 for IT Pros eBook. Our monthly updates make sure that our subscribers stay informed.

14 Replies to “How to Find Teams Channels With a Wiki Tab”

  1. Tx for sharing above interesting & valuable resources.
    Is there a command/method to verify if there’s any content stored/entered on the Wiki tabs?

    1. This is one of those things that is technically possible but not worthwhile. You could find the files in SharePoint, but how could you assess the worth of their content?

      1. Our objective is to inform the business user community (espcially those who’ve put info on Wikis) about the upcoming change to OneNote (or will Wikis users (Team owners/members) be informed automaticaly?

    2. Using GraphAPI I notice that each Wiki Tab has a property ‘hasContent’ which is equals false in case nothing is entered on that page.

      1. That’s no indication of whether the content is valuable. It might help you understand which wikis to check, but someone who knows the content still needs to validate it.

      2. Hi Eric, I’ve been playing with the wiki hascontent configuration and found that not all wikis have the information and in some cases (older channels) it is blank. But it might be a good thing to check and I am updating the script so that people have a chance to use the information. Thanks for pointing it out…

  2. Tony, I’m getting the following error when running your script:

    PS C:\Windows\System32> .\wiki.ps1
    Welcome To Microsoft Graph!
    Finding Teams
    Get-MgTeam : Requested API is not supported. Please check the path.
    At C:\Windows\System32\wiki.ps1:9 char:1
    + [array]$Teams = Get-MgTeam -All
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: ({ Top = , Skip …ndProperty = }:f__AnonymousType29`8) [Get-MgTeam_List], RestException`1
    + FullyQualifiedErrorId : NotFound,Microsoft.Graph.PowerShell.Cmdlets.GetMgTeam_List
    For some reason, I can’t find any Teams… exiting…

    1. Make sure that you’re connected to the beta endpoint.

      Select-MgProfile Beta

      It’s in the script now. I omitted the line when cutting and pasting into GitHub.

  3. Hi Tony, tx for updating the script 👍🙏💪 > great help. In the mean time I used Power Automate w/t same instructions/methods as in your script to compile a list of Channels & Wiki tabs , possible having (useful) content and owners to inform🙂

Leave a Reply

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