Your Teams template may create the wrong channels after you change the Microsoft 365 group that backs a team. This happens when the template definition still points to the old group structure. In this article, you will learn why the mismatch occurs and how to fix it using the Teams admin center and PowerShell.
The root cause is that a Teams template stores a snapshot of channel names and settings. When you change the Microsoft 365 group, the template does not automatically update. You will see channels from the old group appear in new teams, or channels you expect are missing.
We will walk through three fixes: editing the template in the admin center, using PowerShell to update the template JSON, and deleting the template if it is beyond repair. You will also learn how to avoid this problem in the future.
Key Takeaways: Fixing Teams Templates After a Group Change
- Teams admin center > Teams templates > Edit: Lets you change channel names and remove obsolete channels directly in the UI.
- Set-CsTeamTemplate PowerShell cmdlet: Updates the template JSON with the correct channel list and settings.
- Remove-CsTeamTemplate: Deletes a broken template so you can create a fresh one from scratch.
Why a Teams Template Creates the Wrong Channels After a Group Change
A Teams template is a JSON file that defines the initial structure of a team. It includes channel names, channel types, and other settings. When you create a team from a template, Teams copies that JSON into the new team. The template does not reference the original Microsoft 365 group by ID. It only contains the channel names and settings that were saved at the time the template was created or last edited.
When you change the Microsoft 365 group that backs an existing team, you are modifying the group’s membership, name, or other properties. This change does not propagate to the template. The template remains frozen with the old channel list. If you then create a new team from that template, you get the old channels, not the ones from the modified group.
Another scenario is when you change the group’s privacy or classification. The template may still try to create channels that are no longer allowed under the new settings. For example, if the group becomes private, a channel that was marked as public in the template will fail or appear incorrectly.
The mismatch is not a bug. It is by design. Templates are static definitions, not dynamic links. To fix the issue, you must update the template itself to match the intended channel structure.
Steps to Update a Teams Template After a Microsoft 365 Group Change
You have three methods to fix the template. Choose the one that fits your situation. Use the admin center for simple edits, PowerShell for bulk changes, or delete and recreate the template if it is beyond repair.
Method 1: Edit the Template in the Teams Admin Center
- Sign in to the Teams admin center
Go to https://admin.teams.microsoft.com and sign in with an account that has the Teams Administrator role. - Open the Teams templates page
In the left navigation, select Teams apps then Team templates. - Select the template that is creating wrong channels
Click the template name to open its details page. - Click Edit
In the upper right corner of the template details, click Edit. - Update the channel list
Scroll to the Channels section. Remove any channel that belongs to the old group. Add the correct channels that should appear in new teams. You can also change channel names and descriptions. - Save the template
Click Save at the bottom of the page. The template is now updated.
This method is best when you have only a few channels to change. It is visual and does not require any scripting knowledge.
Method 2: Update the Template JSON with PowerShell
Use PowerShell when you have many templates to update or when the admin center does not expose all settings. You need the Teams PowerShell module version 5.1 or later.
- Connect to Microsoft Teams
Open PowerShell and runConnect-MicrosoftTeams. Sign in with an account that has the Teams Administrator role. - Get the current template definition
RunGet-CsTeamTemplate -OdataId "https://graph.microsoft.com/v1.0/teamsTemplates?$filter=displayName eq 'Your Template Name'". Replace the template name with your actual template name. - Export the template JSON to a file
RunGet-CsTeamTemplate -OdataId "..." | ConvertTo-Json -Depth 10 | Out-File template.json. This saves the current definition. - Edit the JSON file
Open template.json in a text editor like Visual Studio Code. Locate thechannelsarray. Modify the channel names and remove any that are obsolete. Save the file. - Update the template
RunSet-CsTeamTemplate -OdataId "..." -Body (Get-Content template.json -Raw). This replaces the template with your edited JSON. - Verify the update
RunGet-CsTeamTemplate -OdataId "..." | ConvertTo-Jsonand check that the channel list is correct.
PowerShell gives you full control. You can also automate this process across multiple templates with a script.
Method 3: Delete and Recreate the Template
If the template is corrupted or has many outdated settings, delete it and create a new one. This is the cleanest approach.
- Delete the template in the admin center
Go to Teams apps > Team templates. Select the template and click Delete. - Create a new template
Click Add to create a new template. Choose a team type that matches your needs. - Define the correct channels
Add only the channels that should appear in new teams. Use the same names and types as the Microsoft 365 group that you changed. - Save the new template
Click Create or Apply to finalize the template.
Deleting a template does not affect existing teams that were created from it. It only prevents future use of the old definition.
If Teams Still Creates the Wrong Channels After the Fix
Teams Shows Channels from the Old Group Even After Editing the Template
This can happen if you edited the template but did not save it correctly. Go back to the template in the admin center and check the channel list. Also verify that you are editing the correct template. You may have multiple templates with similar names.
New Teams Have Missing Channels That Are in the Microsoft 365 Group
A template can only include channels that are defined in the template JSON. If the group has channels that are not in the template, they will not appear. Add those channels to the template using either the admin center or PowerShell.
PowerShell Returns an Error When You Try to Update the Template
The most common error is an invalid JSON format. Validate your JSON file with a tool like JSONLint before running Set-CsTeamTemplate. Another cause is that the template ID is wrong. Use the exact OdataId from Get-CsTeamTemplate.
Users Cannot See the Updated Template in the Teams Client
The Teams client caches template lists for up to 24 hours. Ask users to sign out and sign back in, or wait a day. You can also clear the Teams cache by deleting the %appdata%\Microsoft\Teams folder, but this resets all local settings.
Admin Center Template Editing vs PowerShell vs Deleting the Template
| Item | Admin Center Edit | PowerShell Update | Delete and Recreate |
|---|---|---|---|
| Best for | Small changes to a few channels | Bulk updates or advanced settings | Corrupted or heavily outdated templates |
| Skill required | Basic admin center navigation | PowerShell and JSON knowledge | Basic admin center navigation |
| Time to complete | 5 minutes | 15 minutes including scripting | 10 minutes |
| Risk of error | Low | Medium if JSON is malformed | Low |
| Preserves existing teams | Yes | Yes | Yes |
All three methods preserve existing teams. Only the template definition changes. Choose the method that matches your comfort level and the number of templates you need to fix.
Now you can update a Teams template after changing a Microsoft 365 group. Use the admin center for quick edits or PowerShell for precise control. Check the template channel list before creating a new team to avoid surprises. As an advanced tip, use the Microsoft Graph API to automate template updates as part of your group change process.