License management in office 365 is a pain for most organizations that is why many organizations have written complex solutions based on Powershell.
Thankfully Microsoft has realized that and released group based licensing which is part of Azure AD premium.
If your organization is equipped with Azure AD premium than you are lucky and can use this feature for license management.
Many of our customers use EMS license i.e. Enterprise Mobility + Security which includes Azure Active Directory Premium P1 so group based licensing can be utilized.
Here are the Steps that needs to be followed to implement group based licensing.
Launch Azure Active Directory:
Click on Licenses --> Products
Select the product for which you want to implement group based licesning
Click on Licensed groups --> Assign
Select users and groups --> select the group to which you want to assign the license.
Under assignment options --> You can also choose which services to activate and which not.
Save the changes, it will change to pending state and license assignment will start.
Good thing is that you can toggle services as well as it doesn't impact any services that have already been enabled manually or thru shell, it differentiate these as direct vs inherited assignments.
Direct assignment means --> services are enabled manually or thru Shell.
Inherited assignment means --> These have been enabled by group based licensing.
Note: Dynamic Azure groups are also supported for group based licensing.
If user is getting license from group based licensing than removal of user from the group will remove the licensing as well.
You just need to add user to a group from your provisioning tool and rest group based licensing will take care of assigning the correct office 365 license.
Thanks for reading