<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@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:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
p.codeSnippet, li.codeSnippet, div.codeSnippet
{mso-style-name:codeSnippet;
mso-style-link:"codeSnippet Char";
margin:0in;
background:#E5E5E5;
font-size:9.0pt;
font-family:Consolas;
color:black;}
span.codeSnippetChar
{mso-style-name:"codeSnippet Char";
mso-style-link:codeSnippet;
font-family:Consolas;
color:black;
background:#E5E5E5;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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]--></head><body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Has anyone worked with the Midpoint query api and returning extension attribute values for users? It seems the default schema attributes can be accessed by name fairly easily. Have been looking at the UserType (<a href="https://download.evolveum.com/midpoint/4.2/midpoint-4.2-javadoc/com/evolveum/midpoint/xml/ns/_public/common/common_3/UserType.html">https://download.evolveum.com/midpoint/4.2/midpoint-4.2-javadoc/com/evolveum/midpoint/xml/ns/_public/common/common_3/UserType.html</a>) class but can't seem to find a method to directly access the extension attributes. Was hoping there wouldn’t be a need for regex.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Example:<o:p></o:p></p><p class=codeSnippet>// query for user<o:p></o:p></p><p class=codeSnippet>thisUser = midpoint.searchObjects(UserType.class, userQuery, null)<o:p></o:p></p><p class=codeSnippet><o:p> </o:p></p><p class=codeSnippet>// returns value for givenName<o:p></o:p></p><p class=codeSnippet>thisUser.givenName<o:p></o:p></p><p class=codeSnippet><o:p> </o:p></p><p class=codeSnippet>//returns an arraylist, with additional unwanted info<o:p></o:p></p><p class=codeSnippet>thisUser.extension<o:p></o:p></p><p class=codeSnippet><o:p> </o:p></p><p class=codeSnippet>e.g.<o:p></o:p></p><p class=codeSnippet>[PCV(null):[PP({http://customSchema.com/xml/ns/customSchema}preferredFirstName):[PPV(String:Luke)]]<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thank you,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Jeremiah Haywood<o:p></o:p></p><p class=MsoNormal>Identity and Access Management Administrator <o:p></o:p></p><p class=MsoNormal>Office of Technology Solutions | Illinois State University<o:p></o:p></p><p class=MsoNormal>Phone Number (309) 438-3829<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>