You can use dynamic membership to a group so when you create a user with specific attributes (ie department/office/location/...) the user gets added to the designated group.
https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-membership