This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How To Populate Dynamic Role With AD Group Members

Hoping someone can help out with this as I don't even know where to begin.

I want to build a dynamic role which pulls in the members of certain Active Directory Groups.  Let's say I have two Active Directory Groups: GROUPA and GROUPB.  My goal would be to have the dynamic role filled with the user's from each group.

Does anyone have an SQL snippet example they could share?

Parents
  • You can build this pretty easily with the wizard:

    Which builds the SQL:

    (UID_Person in (select UID_Person from UNSAccount join UNSAccountInUNSGroup on UNSAccount.UID_UNSAccount = UNSAccountInUNSGroup.UID_UNSAccount where (UNSAccount.UID_UNSRoot = N'***YOUR DOMAIN UID ****') and (UNSAccountInUNSGroup.UID_UNSGroup in (select UID_UNSGroup from UNSGroup where cn = N'GroupA')))) and (UID_Person in (select UID_Person from UNSAccount join UNSAccountInUNSGroup on UNSAccount.UID_UNSAccount = UNSAccountInUNSGroup.UID_UNSAccount where (UNSAccount.UID_UNSRoot = N'***YOUR DOMAIN UID ****') and (UNSAccountInUNSGroup.UID_UNSGroup in (select UID_UNSGroup from UNSGroup where cn = N'GroupB'))))

Reply
  • You can build this pretty easily with the wizard:

    Which builds the SQL:

    (UID_Person in (select UID_Person from UNSAccount join UNSAccountInUNSGroup on UNSAccount.UID_UNSAccount = UNSAccountInUNSGroup.UID_UNSAccount where (UNSAccount.UID_UNSRoot = N'***YOUR DOMAIN UID ****') and (UNSAccountInUNSGroup.UID_UNSGroup in (select UID_UNSGroup from UNSGroup where cn = N'GroupA')))) and (UID_Person in (select UID_Person from UNSAccount join UNSAccountInUNSGroup on UNSAccount.UID_UNSAccount = UNSAccountInUNSGroup.UID_UNSAccount where (UNSAccount.UID_UNSRoot = N'***YOUR DOMAIN UID ****') and (UNSAccountInUNSGroup.UID_UNSGroup in (select UID_UNSGroup from UNSGroup where cn = N'GroupB'))))

Children
No Data