1
Vote

Multi-domain usernames

description

I import user profiles from AD to my SSP for 2 trusted domains.
When i run the tool it updates the user with information from the wrong domain, for example:
 
my username is DOMINIO-A\boscolo
another username is ELMEC\boscolo
 
User: Boscolo
Updating "PreferredName", old: "Boscolo Fabrizio", new: "Ivan Boscolo" (OK)
User: Boscolo
Updating "PreferredName", old: "Ivan Boscolo", new: "Boscolo Fabrizio" (WRONG)
 
The same for example for DOMINIO-A\Fontanel and ELMEC\Fontanel
 
User: Fontanel (OK)
Updating "FirstName", old: "Fulvio", new: "Alessandra"
Updating "LastName", old: "Fontanel", new: "Fontanella"
Updating "PreferredName", old: "Fulvio Fontanel", new: "Fontanella Alessandra"
User: Fontanel (WRONG)
Updating "FirstName", old: "Alessandra", new: "Fulvio"
Updating "LastName", old: "Fontanella", new: "Fontanel"
Updating "PreferredName", old: "Fontanella Alessandra", new: "Fulvio Fontanel"
 
I think that the tool should consider even the domain and not only the username as the key to search and process records.
Thanks
Ivan

comments

ivncmdr wrote Jun 25, 2009 at 3:54 PM

Resolved by modifiying this piece of code (comparison of account and accountname properties):

// Loop through user profiles (i.e. Central Administration properties)
        foreach (UserProfile Profile in UPM)
        {
            // Find matching user in User Information List, based on UserName
            SPListItem UILUser = null;
            foreach (SPListItem tmp in UserList.Items)
            {
                if (tmp.ContentType.Name == "Person" &&
                    tmp["UserName"] != null && Profile["UserName"] != null &&
                    tmp["UserName"].ToString().Equals(Profile["UserName"].ToString()) &&
                    tmp["Account"].ToString().ToLower().Equals(Profile["AccountName"].ToString().ToLower()))
                {
                    UILUser = tmp;
                    break;
                }
            }

wrote Feb 14, 2013 at 2:20 AM