Flowing several single-valued attributes to a multi-valued attribute
I have some attributes in the MV, representing phone numbers, and I need to flow them to the multi-valued AD attribute "otherTelephone".
It is not possible to define a flow like
telephone1 -> otherTelephone
telephone2 -> otherTelephone
...
as destination attributes in a synch rule must be unique.
Is there a way to form an array out of several single valued attributes and flow it to a multi-valued attribute, or some other workaround for this scenario?
Thanks,
Paolo
Paolo Tedesco - http://cern.ch/idm
July 2nd, 2010 2:25pm
Hi...
There´s no otherTelephone attribute in Metaverse, you will need to create it (multi-valued).
With attribute created, you can use the code below in a Rule Extension:
Data Source Attribute
Metaverse Attribute
Type
Object Type: User
Object Type: Person
mobile,telephoneAssistant,telephoneNumber
è
otherTelephone
Rules Extension - cd.user:otherMobile,telephoneAssistant,telephoneNumber->mv.person:otherTelephone
case "cd.user:mobile,telephoneAssistant,telephoneNumber->mv.person:otherTelephone":
mventry["otherTelephone"].Values.Add(csentry["mobile"].Value.ToString());
mventry["otherTelephone"].Values.Add(csentry["telephoneAssistant"].Value.ToString());
mventry["otherTelephone"].Values.Add(csentry["telephoneNumber"].Value.ToString());
break;
Cheers,
***** Paulo H. Campos - São Paulo/Brasil ***** http://identitypedia.blogspot.com (in PT-BR)
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2010 7:43pm
I haven't seen any of the declaritive functions that can manipulate multi-value attributes, so assuming that they don't exist, you will have to drop back to an old school management agent extension to accomplish this.
You will need to create an export attribute flow that passes both "telephone1" and "telephone2" in the metaverse to the "otherTelephone" attribute in AD. Within your extension code you will want to clear out any existing values
and assign the values that are present. Your code would look something like:
csentry["otherTelephone"].Values.Clear() if (mventry["telephone1"].IsPresent()) { csentry["otherTelephone"].Values.Add(mventry["telephone1"].Value)}if (mventry["telephone2"].IsPresent()) { csentry["otherTelephone"].Values.Add(mventry["telephone2"].Value)}
You could also probably combine the two values into a single string and visually separate them with a comma or somthing. In other words flow telephone1 + ";" + telephone2 into otherTelephone. Any software that reads AD might get confused
by this, but if it is just people that look at the data in AD you can get away with it. AD doesn't require the data in the otherTelephone attribute to actually be a telephone number, it can be any string.
Which approach you take would depend on what exact requirments you have in AD for the value(s) of otherTelephone.
July 4th, 2010 4:50am
Hi Paulo, thanks for your answer. The metaverse extension part was clear, I just wanted to know if there was a way to map several single-valued attributes to a multi-valued attribute, but, as I thought, there is no way other than writing a Rule Extension.
Sigh.
Cheers,
PaoloPaolo Tedesco - http://cern.ch/idm
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2010 3:28pm