[midPoint] [SPAM LOW] Get all roles assigned to an organisation

Pascal PERICHON pascal.perichon at u-paris.fr
Thu Feb 16 16:40:54 CET 2023


Hello,

maybe something like that? :

import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType
import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType

org = midpoint.getObject(OrgType.class, oidOfTheOrg)
org?.assignment.findAll { it?.targetRef?.type == RoleType.COMPLEX_TYPE 
}.each {
      role = midpoint.getObject(RoleType.class, it?.targetRef.oid)
      log.info("role name: {}", it?.name)
}


Best regards

Pascal PERICHON
Université Paris Cité


Le 13/02/2023 à 18:42, Patrik Sidler via midPoint a écrit :
>
> Hi Community,
>
> I am looking for a way to identify all roles that are assigned to an 
> organization.
>
> getMembers() only shows UserType objects. I am looking for a function 
> to get all RoleType Object that are assigned to an organization.
>
> Thank you in advance for your help.
>
> Best regards,
>
> Patrik Sidler, ITConcepts
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20230216/2d7b8e27/attachment.htm>


More information about the midPoint mailing list