Setting anchor on export in ECMA 2.0?

I've developed a call-based ECMA 2.0 XMA that exports users to a cloud service and this service authors the anchor. The DN is the users email address. I'm trying to use the seemingly proven approach of letting the XMA assign the anchor to the CS entry after the user is provisioned in the connected system, but this doesn't seem to be possible with the ECMA 2.0 spec.

The ECMA 1.0 spec seems to be able to just have cs["anchor"] = "blahblah" assigned to it, but in ECMA 2.0 there is no CSEntry, it's CSEntryChange, a sub-set of the connectors attributes that have changed.

You cannot modify the anchor attributes collection on the CSEntryChange object and adding the anchor to the CSEntryChange.AttributeChanges collection doesn't seem to have any effect.

I get the following error after export in the event log:

"Microsoft.MetadirectoryServices.ExtensibleExtensionException: The anchor attributes were not set in export entry.Forefront Identity Manager 4.0.3644.2"

The code I'm using to assign the anchor to the connector is:

var objectIdAttributeChange = AttributeChange.CreateAttributeAdd("ObjectID", objectId);
csEntryChange.AttributeChanges.Add(objectIdAttributeChange);
Does anyone know how you are meant to let connected-systems author the anchor with ECMA 2.0?

  • Edited by Amethi Monday, March 18, 2013 5:08 PM
March 18th, 2013 8:01pm

Oddly, the exports seem to work and after confirming import and sync there's nothing abnormal about the connector. It's got its ObjectID anchor as I'd expect. Renames are also working. Still, errors on provision of new users is not acceptable so I still need to find out why it's doing this.
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2013 9:29pm

I have a number of ECMA2 MAs that use anchors created by the connected system at the time each object is exported; the code looks generally like this:

results.Add(CSEntryChangeResult.Create(entry.Identifier, new List<AttributeChange>() { AttributeChange.CreateAttributeAdd("SomeAnchor", "SomeValueFromTheCS") }, MAExportError.Success));

March 18th, 2013 10:23pm

As Steve mentioned, you will need your export step to set the value of the anchor in order to prevent the error from occurring. Refer to http://msdn.microsoft.com/en-us/library/windows/desktop/hh859564(v=vs.100).aspx. 

If another unique field exists, consider using it if the above is not possible in the xMA. Some systems have a system-generated primary key, but also accept and use other fields that also satisfy the criteria for a unique identifier (such as an employeeID). Of course, ensure whatever field you select is truly unique and unchanging, or you will introduce transient objects when a rename occurs.

Free Windows Admin Tool Kit Click here and download it now
March 19th, 2013 3:25am

Thanks Steve and Mark, that did the job. Specifically Steve's code snippet was what I needed. I'd forgotten about the CSEntryChangeResult and the part it played!
March 19th, 2013 6:36pm

Hi Steve,

This looks like what I'm trying to do.  What object is "results"?

Thanks

Free Windows Admin Tool Kit Click here and download it now
January 19th, 2015 11:36am

It's the list of CSEntryChangeResult objects that the export function is required to return--essentially per-item reports back to the Sync Service of success or failure.
January 19th, 2015 1:03pm

Hi Steve,

so this is what I have

DimcseCR AsCSEntryChangeResult= CSEntryChangeResult.Create(csentry.Identifier, NewList(OfAttributeChange)(AttributeChange.CreateAttributeAdd("anchor", returnedUserNo.ToString())), MAExportError.Success)

m_PutExportEntriesResults.CSEntryChangeResults.Add(cseCR)

I keep getting an error in the first line.  I think it has to do with the parameters in the CreateAttributeAdd.  Does anything stand out to you?

Thanks again,

Peter

Free Windows Admin Tool Kit Click here and download it now
January 19th, 2015 4:11pm

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

Other recent topics Other recent topics