Populate TargetAddress from Mail attribute

Hi,

I have a management agent pulling AD information from a domain without Exchange, and I want to populate Target Address using the Mail attribute by putting SMTP:x@y.z infront of it.

I've found this article, but having not done any dev work before I'm a bit lost.

https://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.metadirectoryservices.imasynchronization.mapattributesforimport(v=vs.100).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2

Something like cd.user:("SMTP:"mail)->mv.person:targetAddress

Can anyone point me the in right direction to write a custom expression to do this?

Thanks,

James

February 11th, 2015 2:57am

Hello,

seems quite easy to me:

Use the following "Custom Expression" in a AD SyncRule in Inbound Sync:

Source Attribute:(CS) "SMTP:" + mail

Dest. Attribute (MV): targetAddress

Regards
Peter

Free Windows Admin Tool Kit Click here and download it now
February 11th, 2015 12:07pm

Hi Peter, Thanks for the reply.  I don't have the FIM Portal installed (and the install is failing when I try now) so trying to work out how to create an extension DLL.
February 11th, 2015 9:55pm

Hello,

ok thought you use portal as you ask for a "custom expression".

So so generating the MA rules extension project and create the advanced flow in mA see the following links:

http://www.wapshere.com/missmiis/advanced-attribute-flow-rules

https://technet.microsoft.com/en-us/library/cc720667%28v=ws.10%29.aspx

The flowrulename you set in the MA on the advanced attribute flow will be used in the code to point to the correct code part, I like to use friendly names here like: export_targetAddress.

you code in the MapAttributesForExport Method goes like this then:

Case "export_targetAddress"
	If mventry("mail").IsPresent Then
		csentry("targetAddress").Value = "SMTP:" & mventry("mail").Value
	Else
		csentry("targetAddress").Delete()
	End If

Regards
Peter

Free Windows Admin Tool Kit Click here and download it now
February 12th, 2015 3:51am

Thanks Peter, that's a huge help.
February 12th, 2015 5:54pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics