Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

How to provision multiple owners for AD groups

Aashish-Handa
Regular Contributor
Regular Contributor

Hi Team,

We would like to provision multiple group owners to AD while creating or updating the group from Saviynt.

We were able to find the below code snippet from docs but looks like it didn't work properly.

"otherManagedBy":"${ownerAccountListMap.get(allOwnerList?.get(1)?.userkey.username).get(0)?.accountID}"

When reconciled, the group came without any users. We have tested the recon for other groups and it works fine for multiple owners. 

Request you to please let us know if we are missing something in the code snippet, or provide a working code snippet to provision multiple group owners in AD.

Thanks

18 REPLIES 18

adarshk
Saviynt Employee
Saviynt Employee

Please refer the below post and use ownerAccountListMap 

Sample:

"managedBy": "${allOwnerList?.size()>0 && ownerAccountListMap.size()>0 && ownerAccountListMap.get(allOwnerList?.get(0)?.userkey.username)!=null && ownerAccountListMap.get(allOwnerList?.get(0)?.userkey.username).size()>0?ownerAccountListMap.get(allOwnerList?.get(0)?.userkey.username).get(0)?.accountID:null}"

Referance: https://forums.saviynt.com/t5/identity-governance/ad-group-management-group-owner-in-createupdatemap...

Aashish-Handa
Regular Contributor
Regular Contributor

Hi @adarshk ,

Thanks for the response.

We actually have been using the same kind of code snippet for managedBy attribute, and this works for a single owner. Now, we want to provision multiple owners in a single group request. Is there a way we can loop this code snippet to achieve it?

Thanks

adarshk
Saviynt Employee
Saviynt Employee

can you retest with the above shared sample and let us know the results. 

Aashish-Handa
Regular Contributor
Regular Contributor

Yes, I did retest. Only the first owner was updated in AD as owner out of the 3 owners in Saviynt.

adarshk
Saviynt Employee
Saviynt Employee

Only owner with Rank1 will be provisioned as managedby at AD is single valued attribute. 

Yes correct. This is the reason we are using an extended attribute otherManagedBy instead of managedBy to store multiple owners which is a multivalued attribute. Please advise.

Thanks

"otherManagedBy":"${ownerAccountListMap.get(allOwnerList?.get(1)?.userkey.username).get(1)?.accountID}"


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak ,

The above code snippet will provision the second owner in the list, correct? What if there are more than two that we need to provision, and the number of owners to be determined at runtime.

I tried working on a looping code but the createupdatemappings does not support it.

Thanks 

ownerAccountListMap.get(allOwnerList?.get(1)?.userkey?.username)?.collect { it?.accountID.join(', ') }


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Aashish-Handa
Regular Contributor
Regular Contributor

Nothing gets provisioned with this snippet.

AashishHanda_0-1712761850705.png

 

 

 

 

[This message has been edited by moderator to mask sensitive info]

"otherManagedBy": "${allOwnerList?.size() > 1 && ownerAccountListMap.size() > 0 && ownerAccountListMap.get(allOwnerList?.get(1)?.userkey?.username) != null && ownerAccountListMap.get(allOwnerList?.get(1)?.userkey?.username).size() > 0 ? ownerAccountListMap.get(allOwnerList?.get(1)?.userkey?.username).get(0)?.accountID : null}"


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

No @rushikeshvartak , I need to provision n number of owners to my group.

The above mentioned code snippet will provision only one of them, which has been tested earlier as well.

Does above snippet works ?


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

"otherManagedBy": "${allOwnerList?.size() > 1 && ownerAccountListMap.size() > 0 && ownerAccountListMap.get(allOwnerList?.get(1)?.userkey?.username) != null && ownerAccountListMap.get(allOwnerList?.get(1)?.userkey?.username).size() > 0 ? ownerAccountListMap.get(allOwnerList?.get(1)?.userkey?.username).get(0)?.accountID : null}"

Yes, this one does.

Thanks

Aashish-Handa
Regular Contributor
Regular Contributor

But as mentioned earlier, need to provision n number of owners to my group.

How many owners are exists accordingly you need to join and change index


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

You mean something like this:

"otherManagedBy": "${allOwnerList?.size() > 9 && ownerAccountListMap.size() > 0 && ownerAccountListMap.get(allOwnerList?.get(9)?.userkey?.username) != null && ownerAccountListMap.get(allOwnerList?.get(9)?.userkey?.username).size() > 0 ? ownerAccountListMap.get(allOwnerList?.get(9)?.userkey?.username).get(0)?.accountID : null}"

But this snippet will only provision the 10th owner on the list, not the previous nine.

Thanks

Yes


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.