MIM 2016: Build new proxyaddress list in the Metaverse using Vb.Net

I have got to blog this. Could not find a simple code to do this. I know its vb.Net ….one of my “other” languages…chuckle. Here is the Use case. I am syncing a couple of contacts via Galsync. I don’t get the proxyaddress from the parent source so MIM has to build the proxyaddress. I want to clear the MV proxyaddress and regenerate each time.


Case “proxyaddressImportMapping”
‘Clear out what Is in mventry if it exists
If mventry(“proxyAddressCollection”).IsPresent Then
End If
‘Now populate it
If csentry(“mail”).IsPresent Then
If csentry(“extensionAttribute1”).IsPresent Then
mventry(“proxyAddressCollection”).Values.Add(“smtp:” + csentry(“extensionAttribute1”).Value)
End If
mventry(“proxyAddressCollection”).Values.Add(“SMTP:” + csentry(“mail”).Value)
End If