Create a new Security group in Azure Active Directory
Required _ Azure AD Premium P1 if you don’t have one Membership Type will be greyed like below.
Choose Dynamic User
Click on Add Dynamic Query
department Equals Information Technology
Choose Groups _ Click on the group _ Choose Licenses
For Example _ disabling yammer and Skype for business online
Now Auto provisioning of License is Active