<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 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;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Thanks Stian:<o:p></o:p></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Your suggestion works well for 'create' and 'update' events, but when I try to use the
<i>session.users().getUserById(userId, realm), </i>the result is null.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">L</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">if</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black"> (</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getRealmId()
 != </span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">null</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black"> &amp;&amp;
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getAuthDetails().getUserId() !=
</span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">null</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black"> &amp;&amp;
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getResourcePath() !=
</span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">null</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black"> &amp;&amp;
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getResourcePath().startsWith(</span><span style="font-size:10.0pt;font-family:Consolas;color:#2A00FF">&quot;users/&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black">))
 {</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RealmModel
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">realm</span><span style="font-size:10.0pt;font-family:Consolas;color:black"> =
</span><span style="font-size:10.0pt;font-family:Consolas;color:#0000C0">model</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getRealm(</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getRealmId());</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">userId</span><span style="font-size:10.0pt;font-family:Consolas;color:black"> =
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getResourcePath().substring(</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getResourcePath().lastIndexOf(</span><span style="font-size:10.0pt;font-family:Consolas;color:#2A00FF">&quot;/&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black">)&#43;1);</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UserModel
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">user</span><span style="font-size:10.0pt;font-family:Consolas;color:black"> =
</span><span style="font-size:10.0pt;font-family:Consolas;color:#0000C0">session</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.users().getUserById(</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">userId</span><span style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">realm</span><span style="font-size:10.0pt;font-family:Consolas;color:black">);</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">if</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black"> (</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">user</span><span style="font-size:10.0pt;font-family:Consolas;color:black">
 != </span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">null</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black">) {</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">if</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black">(OperationType.</span><b><i><span style="font-size:10.0pt;font-family:Consolas;color:#0000C0">DELETE</span></i></b><span style="font-size:10.0pt;font-family:Consolas;color:black">.equals(</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getOperationType())){</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt;font-family:Consolas;color:#3F7F5F">//Deleting the user in Hubspot
</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><i><span style="font-size:10.0pt;font-family:Consolas;color:#0000C0">log</span></i></b><span style="font-size:10.0pt;font-family:Consolas;color:black">.infov(</span><span style="font-size:10.0pt;font-family:Consolas;color:#2A00FF">&quot;Deleting the user
 (ID={0}) in Hubspot...&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">user</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getEmail());</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">else</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">if</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black">(OperationType.</span><b><i><span style="font-size:10.0pt;font-family:Consolas;color:#0000C0">UPDATE</span></i></b><span style="font-size:10.0pt;font-family:Consolas;color:black">.equals(</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getOperationType())){</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt;font-family:Consolas;color:#3F7F5F">//Deleting the user in Hubspot
</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><i><span style="font-size:10.0pt;font-family:Consolas;color:#0000C0">log</span></i></b><span style="font-size:10.0pt;font-family:Consolas;color:black">.infov(</span><span style="font-size:10.0pt;font-family:Consolas;color:#2A00FF">&quot;Updating the user
 (ID={0}) in Hubspot...&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">user</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getEmail());</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">else</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">if</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black">(OperationType.</span><b><i><span style="font-size:10.0pt;font-family:Consolas;color:#0000C0">CREATE</span></i></b><span style="font-size:10.0pt;font-family:Consolas;color:black">.equals(</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getOperationType())){</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt;font-family:Consolas;color:#3F7F5F">//Deleting the user in Hubspot
</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><i><span style="font-size:10.0pt;font-family:Consolas;color:#0000C0">log</span></i></b><span style="font-size:10.0pt;font-family:Consolas;color:black">.infov(</span><span style="font-size:10.0pt;font-family:Consolas;color:#2A00FF">&quot;Registering the
 user (ID={0}) in Hubspot...&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">user</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getEmail());</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">else</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black">{</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
</span><b><i><span style="font-size:10.0pt;font-family:Consolas;color:#0000C0">log</span></i></b><span style="font-size:10.0pt;font-family:Consolas;color:black">.errorv(</span><span style="font-size:10.0pt;font-family:Consolas;color:#2A00FF">&quot;No User found
 with ID={0}, Operation={1}&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">userId</span><span style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span style="font-size:10.0pt;font-family:Consolas;color:#6A3E3E">event</span><span style="font-size:10.0pt;font-family:Consolas;color:black">.getOperationType());</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><b><span style="font-size:10.0pt;font-family:Consolas;color:#7F0055">else</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black">{</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><i><span style="font-size:10.0pt;font-family:Consolas;color:#0000C0">log</span></i></b><span style="font-size:10.0pt;font-family:Consolas;color:black">.errorv(</span><span style="font-size:10.0pt;font-family:Consolas;color:#2A00FF">&quot;No Realm ID or
 User ID found&quot;</span><span style="font-size:10.0pt;font-family:Consolas;color:black">);</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:black"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:black"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:black"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:black"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">2016-06-13 11:22:02,502 INFO&nbsp; [com.itroi.keycloak.events.hubspot.HubspotEventListenerProvider] (default task-56) Registering the user (ID=user500@mail.com) in
 Hubspot...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">2016-06-13 11:22:19,463 INFO&nbsp; [com.itroi.keycloak.events.hubspot.HubspotEventListenerProvider] (default task-64) Updating the user (ID=user500@mail2.com) in Hubspot...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">2016-06-13 11:22:32,403 ERROR [com.itroi.keycloak.events.hubspot.HubspotEventListenerProvider] (default task-7) No User found with ID=179e55e6-5788-4a10-a640-6661485bfa95,
 Operation=DELETE<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO"><o:p>&nbsp;</o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO">Jairo Henao Rojas<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO">IT ROI Solutions<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO">Software Architect
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO">Mobile&nbsp; : 314-738-6032<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F4E79;mso-fareast-language:EN-CA">Office Colombia: &#43; (571) 381-9185<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F4E79;mso-fareast-language:EN-CA">Office Mexico: &#43; 52-81-4624-4468<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F4E79;mso-fareast-language:EN-CA">Office Chile: &#43; 5622-582-2257<br>
Office USA:&nbsp; 954-518-3330<u><o:p></o:p></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F4E79;mso-fareast-language:EN-CA">Office Canada:&nbsp; 604-998-2280</span><span lang="es-419" style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F4E79;mso-fareast-language:EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><a href="mailto:jahenao@itroisolutions.com"><span lang="es-419" style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#0563C1;mso-fareast-language:ES-CO">jahenao</span><span lang="ES-CO" style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#0563C1;mso-fareast-language:ES-CO">@itroisolution</span><span lang="es-419" style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#0563C1;mso-fareast-language:ES-CO">s</span><span lang="ES-CO" style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#0563C1;mso-fareast-language:ES-CO">.com</span></a><u><span lang="ES-CO" style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO"><o:p></o:p></span></u></p>
<p class="MsoNormal"><span lang="ES-CO" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><img border="0" width="103" height="22" id="Picture_x0020_1" src="cid:image001.png@01D1C567.29DCBAD0" alt="cid:image001.png@01CFACA6.CA39D4D0"></span><span lang="ES-CO" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="ES-CO" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><a href="https://twitter.com/ITROISolutions"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;text-decoration:none"><img border="0" width="32" height="32" id="Picture_x0020_2" src="cid:image002.png@01D1C567.29DCBAD0" alt="Description: Description: cid:image002.png@01CD70CF.8782CD50"></span></a><a href="http://www.linkedin.com/company/itroi-solutions"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;text-decoration:none"><img border="0" width="32" height="32" id="Picture_x0020_3" src="cid:image003.png@01D1C567.29DCBAD0" alt="Description: Description: cid:image003.png@01CD70CF.8782CD50"></span></a><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO">&nbsp;</span><a href="http://www.facebook.com/pages/IT-ROI-Solutions-CA-Clarity-Consultants/110571835703154"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;text-decoration:none"><img border="0" width="32" height="32" id="Picture_x0020_4" src="cid:image004.png@01D1C567.29DCBAD0" alt="Description: Description: cid:image004.png@01CD70CF.8782CD50"></span></a><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO">&nbsp;</span><a href="http://www.youtube.com/user/ITROISolutions"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;text-decoration:none"><img border="0" width="32" height="32" id="Picture_x0020_5" src="cid:image005.png@01D1C567.29DCBAD0" alt="Description: Description: cid:image005.png@01CD70CF.8782CD50"></span></a><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:ES-CO"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> Stian Thorgersen [mailto:sthorger@redhat.com]
<br>
<b>Sent:</b> Monday, June 13, 2016 8:28 AM<br>
<b>To:</b> Jairo Henao &lt;jahenao@itroisolutions.com&gt;<br>
<b>Cc:</b> keycloak-user@lists.jboss.org<br>
<b>Subject:</b> Re: [keycloak-user] Getting the user email before delete it<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">You can get the user object from session.users().getUserById(..), which will give you the email.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On 11 June 2016 at 08:58, Jairo Henao &lt;<a href="mailto:jahenao@itroisolutions.com" target="_blank">jahenao@itroisolutions.com</a>&gt; wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hello community:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I have a listener that is pending when an administrator deletes a user. How I can get the user email?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Apparently I can only get his ID, but I need his email to delete it in HubSpot.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">There is something like a pre-delete event?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D">&nbsp;</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D">Jairo Henao Rojas</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D">IT ROI Solutions</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D">Software Architect
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D">Mobile&nbsp; :
<a href="tel:314-738-6032" target="_blank">314-738-6032</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F4E79">Office Colombia: &#43;
<a href="tel:%28571%29%20381-9185" target="_blank">(571) 381-9185</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F4E79">Office Mexico:
<a href="tel:%2B%2052-81-4624-4468" target="_blank">&#43; 52-81-4624-4468</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F4E79">Office Chile: &#43; 5622-582-2257<br>
Office USA:&nbsp; <a href="tel:954-518-3330" target="_blank">954-518-3330</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F4E79">Office Canada:&nbsp;
<a href="tel:604-998-2280" target="_blank">604-998-2280</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><u><span lang="es-419" style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#1F497D"><a href="mailto:jahenao@itroisolutions.com" target="_blank"><span style="color:#0563C1">jahenao</span><span lang="ES-CO" style="color:#0563C1">@itroisolution</span><span style="color:#0563C1">s</span><span lang="ES-CO" style="color:#0563C1">.com</span></a></span></u><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="ES-CO" style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D"><img border="0" width="103" height="22" id="_x0000_i1025" src="cid:image001.png@01D1C567.29DCBAD0" alt="cid:image001.png@01CFACA6.CA39D4D0"></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="ES-CO" style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="https://twitter.com/ITROISolutions" target="_blank"><span style="text-decoration:none"><img border="0" width="32" height="32" id="_x0000_i1026" src="cid:image002.png@01D1C567.29DCBAD0" alt="Description: Description: cid:image002.png@01CD70CF.8782CD50"></span></a><a href="http://www.linkedin.com/company/itroi-solutions" target="_blank"><span style="text-decoration:none"><img border="0" width="32" height="32" id="_x0000_i1027" src="cid:image003.png@01D1C567.29DCBAD0" alt="Description: Description: cid:image003.png@01CD70CF.8782CD50"></span></a><span style="color:#1F497D">&nbsp;</span><a href="http://www.facebook.com/pages/IT-ROI-Solutions-CA-Clarity-Consultants/110571835703154" target="_blank"><span style="text-decoration:none"><img border="0" width="32" height="32" id="_x0000_i1028" src="cid:image004.png@01D1C567.29DCBAD0" alt="Description: Description: cid:image004.png@01CD70CF.8782CD50"></span></a><span style="color:#1F497D">&nbsp;</span><a href="http://www.youtube.com/user/ITROISolutions" target="_blank"><span style="text-decoration:none"><img border="0" width="32" height="32" id="_x0000_i1029" src="cid:image005.png@01D1C567.29DCBAD0" alt="Description: Description: cid:image005.png@01CD70CF.8782CD50"></span></a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</body>
</html>