Automate licensing and group membership for your Microsoft 365 for enterprise test environment
This Test Lab Guide can only be used for Microsoft 365 for enterprise test environments.
Group-based licensing automatically assigns or removes licenses for a user account based on group membership. Dynamic group membership adds or removes members to a group based on user account properties, such as Department or Country. This article steps you through demonstrations of both adding and removing group members in your Microsoft 365 for enterprise test environment.
Setting up auto-licensing and dynamic group membership in your Microsoft 365 for enterprise test environment involves two phases:
- Phase 1: Build out your Microsoft 365 for enterprise test environment
- Phase 2: Configure and test dynamic group membership and automatic licensing
For a visual map to all the articles in the Microsoft 365 for enterprise Test Lab Guide stack, go to Microsoft 365 for enterprise Test Lab Guide Stack.
Phase 1: Build out your Microsoft 365 for enterprise test environment
If you want to only test automated licensing and group membership in a lightweight way with the minimum requirements, follow the instructions in Lightweight base configuration.
If you want to test automated licensing and group membership in a simulated enterprise, follow the instructions in Pass-through authentication.
Testing automated licensing and group membership doesn't require the simulated enterprise test environment, which includes a simulated intranet connected to the internet and directory synchronization for an Active Directory Domain Services (AD DS) forest. It's provided here as an option so that you can test automated licensing and group membership and experiment with it in an environment that represents a typical organization.
Phase 2: Configure and test dynamic group membership and automatic licensing
First, create a new group named Sales, and add a dynamic group membership rule so that user accounts with the Department set to Sales automatically join the Sales group.
- In a private instance of your internet browser, sign in to the Microsoft 365 admin center with the global administrator account of your Microsoft 365 E5 test lab subscription.
- On a separate tab of your browser, go to the Azure portal at https://portal.azure.com.
- In the Azure portal, enter groups in the search box, and then select Groups.
- in the All groups pane, select New group.
- In Group type, select Microsoft 365.
- In Group name, enter Sales.
- In Membership type, select Dynamic user.
- Select Dynamic user members.
- In the Dynamic membership rules pane:
- Select the department property.
- Select the Equals operator.
- In the Value box, enter Sales.
- Select Save.
- Select Create.
Next, configure the Sales group so that members are automatically assigned the Microsoft 365 E5 license.
- Select the Sales group, and then select Licenses.
- In the Update license assignments pane, select Microsoft 365 E5, and then select Save.
- In your browser, close the Azure portal tab.
Next, test dynamic group membership and automatic licensing on the User 4 account:
- From the Microsoft Office Home tab in your browser, select Admin.
- From the Microsoft 365 admin center tab, select Active users.
- On the Active users page, select the User 4 account.
- On the User 4 pane, select Edit for Product licenses.
- On the Product licenses pane, disable the Microsoft 365 E5 license, and then select Save > Close.
- In the properties of the User 4 account, verify that no product licenses have been assigned and there are no group memberships.
- For Contact information, select Edit.
- In the Edit Contact information pane, select Contact information.
- In the Department box, enter Sales, and then select Save > Close.
- Wait a few minutes, and then periodically select the Refresh icon in the upper-right of the User 4 account pane.
In time, you should see the:
- Group memberships property updated with the Sales group.
- Product licenses property updated with the Microsoft 365 E5 license.
See these articles to deploy dynamic group membership and automatic licensing in production:
Explore additional identity features and capabilities in your test environment.
Submit and view feedback for