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)