13,732 questions
You could use a dynamic group if the accounts are synchronized to Microsoft Entra with a rule like:
(user.mail -endsWith "domain.com")
Then you could assign the licenses to that group.
https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership
https://learn.microsoft.com/entra/identity/users/licensing-admin-center