<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,<br>
</p>
<p>maybe something like that? :</p>
import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType<br>
import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType<br>
<br>
org = midpoint.getObject(OrgType.class, oidOfTheOrg)<br>
org?.assignment.findAll { it?.targetRef?.type ==
RoleType.COMPLEX_TYPE }.each {<br>
role = midpoint.getObject(RoleType.class, it?.targetRef.oid)<br>
log.info("role name: {}", it?.name)<br>
}<br>
<p><br>
</p>
<p>Best regards</p>
Pascal PERICHON<br>
Université Paris Cité
<p><br>
</p>
<div class="moz-cite-prefix">Le 13/02/2023 à 18:42, Patrik Sidler
via midPoint a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:ZR0P278MB023443D8A84EA6047E933D52EFDD9@ZR0P278MB0234.CHEP278.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Verdana",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif">Hi
Community,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif"
lang="EN-US">I am looking for a way to identify all roles
that are assigned to an organization.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif"
lang="EN-US">getMembers() only shows UserType objects. I am
looking for a function to get all RoleType Object that are
assigned to an organization.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif"
lang="EN-US">Thank you in advance for your help.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif"
lang="EN-US">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif"
lang="EN-US">Patrik Sidler, ITConcepts</span></p>
</div>
</blockquote>
</body>
</html>