How to Create an Education Team with Dynamic Membership using PowerShell
Question details
The user wants to automate the creation of a Microsoft Education Team that automatically updates its membership based on dynamic rules.

- Product
- Microsoft Teams
- Device & OS
- not provided
- Scenario
- Setting up a dynamic Education Team via PowerShell where members are added or removed automatically based on defined user attributes.
- Observed behavior
- Requires the correct procedure to first create a dynamic Microsoft 365 group with a membership rule and then convert it into an Education Team.
Ensure you have Azure AD administrator privileges, an active Azure AD Premium P1 license (required for dynamic groups), and have the Microsoft Graph and Microsoft Teams PowerShell modules installed.
Create a Dynamic Microsoft 365 Group and Convert it to a Team
To achieve dynamic membership in Teams, you must first create a Microsoft 365 group with dynamic membership rules in Azure AD, and then instantiate a Team from that existing group.
Microsoft Teams does not natively support creating a dynamic team directly in one step. The required workflow involves creating a dynamic Microsoft 365 group first. Education policies may also require specific student/teacher licensing configurations.
Open PowerShell as Administrator and use 'Connect-AzureAD' (or Microsoft Graph equivalents) and 'Connect-MicrosoftTeams' to authenticate your administrator session.
Run the 'New-AzureADMSGroup' command. Set the '-GroupTypes' parameter to 'DynamicMembership' and ensure '-MailEnabled' and '-SecurityEnabled' are configured correctly for a unified group.
Assign a valid membership rule to the group using the '-MembershipRule' parameter (e.g., matching a specific department or student attribute) and set '-MembershipRuleProcessingState' to 'On'.
Once the group is provisioned and the rule has processed members, run 'New-Team -Group <YourGroupID>' to attach a Microsoft Team to the dynamic group.

Looking for a seamless Office alternative? Try WPS Office
While configuring complex dynamic teams requires Microsoft 365 administrator tools and premium licenses, managing your everyday educational documents, assignments, and spreadsheets shouldn't be complicated. WPS Office provides a lightweight, highly compatible suite perfect for students, teachers, and administrative staff.
- 1. Download the Installer: Visit the official WPS Office website and click the 'Free Download' button.
- 2. Install the Software: Run the downloaded installer and follow the simple on-screen instructions to set up the suite.
- 3. Open and Edit Files: Launch WPS Writer, Spreadsheet, or Presentation to immediately open and edit your existing Microsoft Office files without formatting loss.

Frequently Asked Questions
Do I need special licenses to use dynamic membership in Microsoft Teams?
Yes, utilizing dynamic membership for Microsoft 365 groups (and therefore Teams) requires an Azure AD Premium P1 license for the tenant admin and for each unique user that is a member of the dynamic group.
Why isn't my Team updating immediately after changing the dynamic membership rule?
Dynamic group membership rules run on a background process in Azure AD. It can take anywhere from a few minutes to 24 hours to fully process and update the membership, depending on the size of your Azure Active Directory tenant.
Can I convert an existing static Education Team into a dynamic one using PowerShell?
Yes, an administrator can change an existing group's membership type from 'Assigned' to 'Dynamic User' in the Azure AD portal or by using the 'Set-AzureADMSGroup' PowerShell cmdlet to apply a new membership rule.




