create one identity from multiples rows in a table
I'm working with ILM and i've a great experience creating and modifying users. Now i'm trying to add the home and mobile phones to my users, but the problem is that the phone users database is formated in this way: rows:employeeID:123 | type:home | number:+5621employeeID:456 | type:mobile| number:+9543employeeID:123 | type:mobile | number:+8763 as you can see there are many employeeID equal but with different number.Do you have any ideas how could I create a unique IDby usingthe employeeID attribute? To associate the number to a particular attributeI've create two custom expression (per example, if the type is mobile, the number is placed into the mobilephone attribute) and seems to work nicely. But the problem is with the employeeID because I need to create only one person from multiples rows :( and I don't have any other attribute to map as anchor, only the EmployeeID.Any help would be appreciated.thanks a lot www.flashlight.cl
July 22nd, 2009 5:36pm

There are a couple of different options... 1) Create a view on the SQL side to present the information as one table...2) join them all in ILM anduse import attribute flows to determine which ones to apply to which attributes.. if (csentry["type"].Value == "home") mventry["homephonoe"].Value = csentry["number"].ValueEricEric
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2009 1:00am

I can't usethe option 1, because is equal toimport datafrom the source into a SQL Server andexportto AD. SoILM isuseless :(Could you please explain more about joining the data?If I make the first import, I found all duplicated attributes even beforeI use the join option to add them to the metaverse.thanks foryou response :)www.flashlight.cl
July 24th, 2009 5:17pm

For #2, Just join them as normal... The side effect of having multiple objects from one MA (and one object type) to one object is the MV is that you will have "ambiguous-flow-errors" in you try to write a direct import attribute flow. So you need to write an advanced attribute flow like the snippet I posted in the earlier message. That will be executed on each object but only bring the value from the phone object with the type of "home". You may have problems if you have multiple "home" types but it should work well enough. I have a customer that does something similar on multiple AD User accounts. EricEric
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2009 9:59pm

You can set the anchor as all 3 attributes to get rid of the duplicate errors. Quite an easy fix.As for the multiple joins, it's pretty easy to do, but your going to need to use code.There are some great examples in the developer reference to do this... One thing you need to make sure you take into account is the use of delta syncs and full syncs.Using code to populate a multivalue attribute in the metaverse is pretty easy for full syncs.. But for deltas it requires some extra thought.When you run a sync you should evaluate every connected object in the ma for the value you want to use. Meaning if you have 3 seperate phone number objects and have an update on one object your code looks at each source attribute on every connected object to make sure all of the objects are checked.. This guarentees that each change is caught.It will give you some interesting run profiles, but will work quite nicely.Here's some code to help you... Dim finalValues As ValueCollection = Utils.ValueCollection("FinalValue") finalValues.Clear() finalValues.Add("value") NewCSEntry("Attribute").Values = finalValues The trick is to enumerate through each csobject and build the multivalue attribute with this code.HTH,JoeJoe Stepongzi - Identity Management Consultant - ILM MVP - www.microsoftIdM.com,ilmXframework.codeplex.com
July 26th, 2009 7:02am

HmmmThis is in the ILM 2 forum so let's assume that it's ILM 2 and we can use Sync RulesSo first Joe is right something has to be done about the anchor and Eric is definitely right about ambiguous import flow errors from multiple objects use import attribute flow rules.1) Make the anchor composite based on employee id and phone type (although this still breaks if you allow two mobile phones for an employee)2) What happens if we use narrowly scope sync rules to flow attributes inbound: a) sync rule that is scoped to phone of type mobile and flows the number into the mobile attribute b) sync rule that is scoped to phone of type home and flows the number into the home# attributeWould we still get the ambigous import flow error? I haven't tried this yet so I don't know but it is worth the experiment.As to the assertion that the effort required to write a view to transform the data makes ILM worthless, I would ask you to consider the following:1) ILM will handle delta syncs and delta exports quite nicely ensuring low impact to AD2) perhaps you also need to send that data somewhere in addition to AD in which case already having it in ILM is very handy.Assuming SQL 2005 or later this can be solved using the PIVOT operator see the full example below (includes test data) CREATE TABLE #Phones (EmployeeID int, PhoneType varchar(30), PhoneNumber varchar(30)) INSERT #PHONES VALUES (1,'Home','555-555-1001') INSERT #PHONES VALUES (1,'Mobile','555-555-2001') INSERT #PHONES VALUES (1,'Work','555-555-3001') INSERT #PHONES VALUES (2,'Home','555-555-1002') INSERT #PHONES VALUES (2,'Mobile','555-555-2002') INSERT #PHONES VALUES (2,'Work','555-555-3002') INSERT #PHONES VALUES (3,'Home','555-555-1003') INSERT #PHONES VALUES (3,'Mobile','555-555-2003') INSERT #PHONES VALUES (3,'Work','555-555-3003') INSERT #PHONES VALUES (4,'Home','555-555-1004') INSERT #PHONES VALUES (4,'Mobile','555-555-2004') INSERT #PHONES VALUES (4,'Work','555-555-3004') SELECT EmployeeID, [Mobile] , [Home], [Work] FROM (SELECT EmployeeID , PhoneType , PhoneNumber FROM #Phones) p PIVOT ( MAX (PhoneNumber) FOR PhoneType IN ( [Mobile] , [Home], [Work] ) ) AS pvt ORDER BY EmployeeID David Lundell www.ilmBestPractices.com
Free Windows Admin Tool Kit Click here and download it now
September 27th, 2009 7:51am

Finally, we create another view with the phone numbers normalized in this way: a. The principal Office Number is in the second row (the first one is used to allocate the EmployeeID) b. The secondaries Office Numbers are in the third row separated by a ";" and I configured ILM to send this numbers to the OtherTelephoneNumbers attribute. Same thing for the Mobile and Home Numbers. Isn't the best option, but at least this solution reduce the pressure :SI'm happy for all your responses and thanks for help me with this :)
October 5th, 2009 5:06pm

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

Other recent topics Other recent topics