Hi,
Yes it is possible and you can assign users or groups in the application, however you will need to create dynamic groups with sort of your requirements based on the filters and expressions.
Note you will require Azure AD P1 Licenses for this.
More information and detailed information covered in this article.
https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-membership