I have a list of users that need to be added to a a security group in AD depending on some kind of mapping table.
Mapping table example:
Gender, Department, Security Group
M, HR, Group 1
F, HR, Group2
M, Finance, Group 3
F, Finance, Group 4
Note: This is just an example
So I have a list of users where I can read the gender en department from the object and I need to add them to a corresponding group according to the mapping table.
If this mapping table is changed, the group membership should changed dinamically.
What would be the easiest approach fir this?
I don't like to have a lot of if statements as the mapping table is very big.