EscapeDNComponent Function
I'm trying to use the EscapeDNComponent function as part of a sync rule flow mapping. I have the displayName attribute configured to be as such via a previous inbound flow:lastName, firstNameI'm expecting to be able to do:EscapeDNComponent(displayName)...and get "lastName\, firstName" but I get an error instead about the value not being a proper LDAP format. The exact error is:Microsoft.MetadirectoryServices.FunctionEvaluationException: Error encountered during evaluation of Sync Rule: '~ADDS Enabled Managers'. Details: Invalid LDAP style DN component. at Microsoft.MetadirectoryServices.FunctionLibrary.AttributeFlowMappingHandler.ExecuteOutboundTransformation(CSEntry csentry, MVEntry mventry, String strSyncRuleGuid, String xmlExpression, String workflowParameterTypes, String workflowParameterValues)My custom expression would be something like:"CN="+EscapeDNComponent(displayName)+",OU=Users,DC=domain,DC=com"I've also tried escapting the entire string but that fails with the same error.Brad Turner, ILM MVP - Ensynch, Inc - www.identitychaos.com
November 11th, 2009 11:04am

Hi Brad...I dont know if this is causing the error, but in AD DistinguishedName to Users container I always use ...+"CN=Users,DC=domain,DC=com".Regards,Paulo
Free Windows Admin Tool Kit Click here and download it now
November 11th, 2009 4:45pm

Sorry, bad example, my actual DN is valid, it's the usage of the EscapeDNComponent that causes the error. Swapping out this component with a manually escaped string works fine:"CN="+lastName+"\, "+firstName+"CN=Users,DC=domain,DC=com"Brad Turner, ILM MVP - Ensynch, Inc - www.identitychaos.com
November 11th, 2009 6:38pm

This function expects a component of a DN. Something like this is what you should use:EscapeDNComponent("CN="+DisplayName)If you do not incude the CN= to the function, it is not a valid component./AndreasThis posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/copyright.htm
Free Windows Admin Tool Kit Click here and download it now
November 12th, 2009 8:18am

I was looking for this today for FIM 2010, and if you're like me, you like things spelled out :)I had to use CustomExpression and enter this for my Outbound Attribute Flow -> dnCustomExpression(EscapeDNComponent("CN="+displayName)) + ",OU=FIMObjects,..."And voila, last, first displaynames work! :)
December 29th, 2009 1:50am

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

Other recent topics Other recent topics