Table of Contents
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.
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.

