Reading and removing a multivalued attribute in a FIM workflow

Our client would like users to be forced to re-register for their password reset questions when they have had their password reset from the portal.

I already had a custom workflow to reset the user’s password, but that was just reading single valued attributes. Reading the multi-valued “UniqueIdentifier” attribute was a new one to me.

Here’s the code to read the attribute:

List<Microsoft.ResourceManagement.WebServices.UniqueIdentifier> listAuthNWFRegistered = newList<Microsoft.ResourceManagement.WebServices.UniqueIdentifier>();

listAuthNWFRegistered = resource2[“AuthNWFRegistered”] as List<Microsoft.ResourceManagement.WebServices.UniqueIdentifier>;

foreach (Microsoft.ResourceManagement.WebServices.UniqueIdentifier val in listAuthNWFRegistered)

{

sAuthNWFRegisteredGuid = val.ToString().Replace(“urn:uuid:”, “”);

}

And  then, to remove the attribute, the UpdateRequestParameter is this:

new UpdateRequestParameter(“AuthNWFRegistered”, UpdateMode.Remove, sAuthNWFRegisteredGuid)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s