[midPoint] HowTo: Welcome mail send only once

Ivan Noris ivan.noris at evolveum.com
Mon Aug 18 16:36:04 CEST 2025


Hi Mike,

what about trying *userPasswordNotifier*? It is very similar to 
accountPasswordNotifier, but it uses midPoint password and not account 
password.

If you create users and generate their passwords in a single step, this 
might well be what you want.

See also: https://docs.evolveum.com/midpoint/guides/notifications-howto/

Best regards,

Ivan

On 18. 8. 2025 12:12, mikhail.nikolaenko via midPoint wrote:
>
> Hello dear community,
>
> We have the following business requirement: when a new user is 
> created, the system must send a welcome email to their private email 
> address containing some text and the initial password.
>
> My first idea was to use *simpleUserNotifier* for the */add/ 
> *operation. However, I was not able to find a way to access the newly 
> generated password.
>
> As an alternative, I used *accountPasswordNotifier*, and from there I 
> can send the welcome email with the password. This works, but now I 
> need to ensure that it happens only once.
>
> As soon as the email is successfully sent (sure we could not be sure 
> if it was delivered, but at least send operation has been completed 
> without error), no further emails should be triggered by password 
> changes in midPoint. My first thought was to follow a common approach 
> by using a custom attribute like /isWelcomeMailSent/, and setting it 
> to /true/ once the email has been sent.
>
> So my question is: how can I modify a person attribute at the moment 
> the email is sent? Is it possible to do this directly from the 
> notification script? Or perhaps I was wrong, and there is actually a 
> way to access the new password in the /add/ operation context?
>
> Best regards,
> Mike
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> https://lists.evolveum.com/mailman/listinfo/midpoint

-- 
Ivan Noris
Expert Identity Engineer
evolveum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20250818/0ddedcd3/attachment.htm>


More information about the midPoint mailing list