[midPoint] Export list of emails

Arnošt Starosta - AMI Praha a.s. arnost.starosta at ami.cz
Thu Jan 30 14:14:16 CET 2020


Hi Rainer,

if you need to export the list just once or can run the export manually
when needed you can abuse the query playground in gui and hql

select
u.emailAddress
from
RUser u

or for an extension attribute (midpoint 4.0 version)

select
u.name.orig, us.value
from
RUser u
left join u.strings us with ( us.ownerType = 0)
join RExtItem usi with ( usi.id = us.itemId and usi.name
='your-extension-namespace#your-attribute')

left join with other data types if needed,
check com.evolveum.midpoint.repo.sql.data.common.RUser source.

It works up to tens of thousands of users only.

arnost

čt 30. 1. 2020 v 13:29 odesílatel Rainer Herbst <rainer.herbst at aip.de>
napsal:

> Hi Gustav,
>
> thank you for the hint.
>
> Unfortunatly, the CSV user export provides only standard attributes. The
> email address is stored in an custom specific attribute ("mainAIPEmail"),
> which is not included into the CSV. How can I customize the CSV export?
>
> TIA!
> Rainer
>
> On Thu, 30 Jan 2020 11:06:19 +0100
>   Pálos Gustáv <gustav.palos at gmail.com> wrote:
> > Hi Viele,
> >
> > if you need just one time export, you can use 4. button at the
> >bottom of
> > User List page "CSV export". Open it, and delete not needed columns.
> >
> > Best regards,
> >
> > Gustav
> >
> > št 30. 1. 2020 o 10:34 Rainer Herbst <rainer.herbst at aip.de>
> >napísal(a):
> >
> >> Dear all,
> >>
> >> I wanted to solve the following simple problem - export a list of
> >>email
> >> addresses from Midpoint into a csv file.
> >>
> >> So, I defined a CSV resource with only one attribute (email) and set
> >>a
> >> synchronisation:
> >>    <synchronization>
> >>    <objectSynchronization>
> >>    <name>Import</name>
> >>    <enabled>true</enabled>
> >>    <correlation>
> >>    <q:equal>
> >>    <q:path>extension/mainAIPEmail</q:path>
> >>    <expression>
> >>    <path>$projection/attributes/email</path>
> >>    </expression>
> >>    </q:equal>
> >>    </correlation>
> >>    <reconcile>true</reconcile>
> >>    <reaction>
> >>    <situation>linked</situation>
> >>    <synchronize>true</synchronize>
> >>    </reaction>
> >>    <reaction>
> >>    <name>Link</name>
> >>    <situation>unlinked</situation>
> >>    <synchronize>true</synchronize>
> >>    <action>
> >>    <name>Exportieren</name>
> >>    <handlerUri>
> >> http://midpoint.evolveum.com/xml/ns/public/model/action-3#link
> >> </handlerUri>
> >>    <order>befor</order>
> >>    </action>
> >>    </reaction>
> >>    <reaction>
> >>    <name>Export</name>
> >>    <situation>deleted</situation>
> >>    <synchronize>true</synchronize>
> >>    <action>
> >>    <name>Exportieren</name>
> >>    <handlerUri>
> >> http://midpoint.evolveum.com/xml/ns/public/model/action-3#addShadow
> >> </handlerUri>
> >>    <order>before</order>
> >>    </action>
> >>    </reaction>
> >>    </objectSynchronization>
> >>    </synchronization>
> >>
> >> Now, I am able to connect to the resource and to link existing email
> >> entries
> >> to users.
> >>
> >> But what kind of task should I use to export emails not found in the
> >>csv
> >> file yet?
> >>
> >>
> >> Viele Grüße,
> >>
> >> Rainer Herbst
> >> Leiter IT-Service
> >> Phone: +49 331 7499-257
> >> e-mail: rainer.herbst at aip.de
> >> https://www.aip.de
> >>
> >>
> >>
> -----------------------------------------------------------------------------------------------
> >> Leibniz-Institut für Astrophysik Potsdam (AIP)
> >> An der Sternwarte 16, 14482 Potsdam
> >>
> >> Vorstand: Prof. Dr. Matthias Steinmetz, Matthias Winker
> >> Stiftung bürgerlichen Rechts
> >> Stiftungsverzeichnis Brandenburg: 26 742-00/7026
> >>
> >>
> -----------------------------------------------------------------------------------------------
> >> _______________________________________________
> >> midPoint mailing list
> >> midPoint at lists.evolveum.com
> >> http://lists.evolveum.com/mailman/listinfo/midpoint
> >>
> >
> > --
> > s pozdravom
> >
> > Gustáv Pálos
>
> Viele Grüße,
>
> Rainer Herbst
> Leiter IT-Service
> Phone: +49 331 7499-257
> e-mail: rainer.herbst at aip.de
> https://www.aip.de
>
>
> -----------------------------------------------------------------------------------------------
> Leibniz-Institut für Astrophysik Potsdam (AIP)
> An der Sternwarte 16, 14482 Potsdam
>
> Vorstand: Prof. Dr. Matthias Steinmetz, Matthias Winker
> Stiftung bürgerlichen Rechts
> Stiftungsverzeichnis Brandenburg: 26 742-00/7026
>
> -----------------------------------------------------------------------------------------------
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>


-- 

*Arnošt Starosta*
solution architect

gsm: [+420] 603 794 932
e‑mail: arnost.starosta at ami.cz

*AMI Praha a.s.*
Pláničkova 11, 162 00 Praha 6

tel.: [+420] 274 783 239 | web: www.ami.cz

[image: AMI Praha a.s.]

Textem tohoto e‑mailu podepisující neslibuje uzavřít ani neuzavírá
za společnost AMI Praha a.s.
jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně
písemnou formu.

Tento e‑mail je určen výhradně pro potřeby jeho adresáta/ů a může obsahovat
důvěrné nebo osobní
informace. Nejste‑li zamýšleným příjemcem, je zakázáno jakékoliv
zveřejňování, zprostředkování
nebo jiné použití těchto informací. Pokud jste obdrželi e‑mail neoprávněně,
informujte o tom prosím
odesílatele a vymažte neprodleně všechny kopie tohoto e‑mailu včetně
všech jeho příloh. Nakládáním
s neoprávněně získanými informacemi se vystavujete riziku právního postihu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200130/1454d5e2/attachment.htm>


More information about the midPoint mailing list