SharePoint 2007: Importing User Profile information

Posted on 4/4/2007 @ 7:03 AM in #SharePoint by | Feedback | 34132 views

Let us say that you are setting up SharePoint 2007 in your organization. Typically your users will access a SharePoint installation through a site collection. Which means, you need to give your users access to a particular site.

But where do these users come from? SharePoint 2007 allows you to plug in any kind of authentication using a membership provider, but for many scenarios you will simply install SharePoint 2007 and use it under the default active directory based authentication – a.k.a. 2003 styliee.

When you do setup SharePoint 2007, and a site collection in there, and you enter a UserID such as DOMAIN\smalik, you would note that all the nice goo such as my email addy, phone number etc. – typically stuff you would see in outlook gal or active directory, or any other such system doesn’t get pulled in automatically.

To pull in that stuff, you need to import the user profile information, and here is how you do it.

1.  Create a Shared Services site (for which you need to setup indexing and search beforehand). Typically in a real deployment scenario, you would want to keep shared services being served by a dedicated machine other than your web heads (a tip I learnt from Scott Hillier – whose excellent Apress book on SharePoint 2007 I am reviewing right now).

2. Once that is created go to that shared services site, and under “User Profiles and My Sites”, click on “User Profiles and Properties”.

3. When in there, you need to setup an import connection. You can create as many connections as you want – which means if you have multiple kinds of authentication going on, on the same physical box – you should have some means of uniquely differentiating each user – if indeed your organization uses two different repositories of users. In most scenarios you would use active directory, but SharePoint will let you import from AD, LDAP, ADR or any BDC (supplementary information only).

4. So go ahead and setup an import connection. Then back at “Configure Profile Import” set up an import schedule with proper user access rights. It is a good idea to setup an incremental import – which performs a full import to begin with.  You can schedule such an import, or you can perform such an import on demand. I like to keep full import unscheduled – and I use that for “wipe out and lets start over” scenarios only.

5. Real world – I imported 48,707 profiles in around 29 minutes – not bad eh?

6. Finally, before you actually start the import, you probably want to map the properties appropriately. So “Email Address” shows up in “Work Email” and so on so forth.

Once everything is setup – hit import, and then the incremental job will run at your specified schedule, and your sites in that site collection will begin to recognize users not as “Domain\smalik” but as “Malik, Sahil” with full meta data. Then you can use that information to power hierarchical org charts, searching over the user metabase via SharePoint, membership information to various groups/mailing lists setup on exchange server etc.

Quite powerful I must say J

Sound off but keep it civil:

Older comments..

On 5/1/2007 4:07:42 PM Mo said ..
Hi Sahil,

Is there a way to import the user profile data into site collection users automatically / manually in a batch?

On 8/14/2007 8:41:39 PM Anand said ..
hi Sahil,

Thanks for your post.

I am facing problem while importing profile in profile database using BDC.

1.I added those users on my computer (under user group).

2.I manually added users in Profile database of sharepoint with accountname same as users on the machine (This is workaround since I am virtual machine which can not access AD).

3. Then I have oracle database which is having some additional columns.

4. I am querying data through BDC and also able to see this is web part.

5. But when I try to import this imformation using profile import it is failing.

Any idea why ? Does it have dependency on AD(always)?

On 8/14/2007 9:49:27 PM Attila said ..
Can you give more details as to the difference between the full import and the incremental import? What exactly is the difference between the two?

On 10/10/2007 5:46:49 PM Aarthy said ..
Hi Anand,

I am also facing the same problem.Your problem got solved?

Please let me know.

Thanks in advance.


On 3/25/2008 2:34:08 AM arun said ..
I have created a BDC application file just by following your blog procedures.

My metadata as follows :







<Property Name="Wildcardcharacter" Type="System.String">%</Property>



<LobSystemInstance Name="CustomersDB">


<Property Name="AuthenticationMode" Type="System.String">PassThrough</Property>

<Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property>

<Property Name="RdbConnection Data Source" Type="System.String">XXXXXXX</Property>

<Property Name="RdbConnection Initial Catalog" Type="System.String">AdventureWorks</Property>

<Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property>





<Entity Name="CustomersDB">


<Property Name="LastName" Type="System.String">LastName</Property>



<Identifier Name="ContactID" TypeName="System.Int32"></Identifier>



<Method Name="GetContactDetails">


<Property Name="RdbCommandType" Type="System.Data.CommandType">Text</Property>

<Property Name="RdbCommandText" Type="System.String">

SELECT ContactID, FirstName, LastName,Phone FROM Person.Contact WHERE ContactID = @ContactID




<FilterDescriptor Name="ContactID" Type="Comparison" />



<Parameter Direction="In" Name="@ContactID">

<TypeDescriptor Name="ContactID" AssociatedFilter="ContactID" TypeName="System.Int32" IdentifierName="ContactID" />


<Parameter Direction="Return" Name="GetCustomers">

<TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="CustomerDataReader">


<TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="CustomerDataRecord">


<TypeDescriptor TypeName="System.Int32" IdentifierName="ContactID" Name="ContactID" />

<TypeDescriptor TypeName="System.String" Name="FirstName" />

<TypeDescriptor TypeName="System.String" Name="LastName" />

<TypeDescriptor TypeName="System.String" Name="Phone" />








<MethodInstance Name="CustomerFinderInstance" Type="Finder" ReturnParameterName="GetCustomers" />

<MethodInstance Name="CustomerSpecificfinderInstance" Type="SpecificFinder" ReturnParameterName="GetCustomers"/>








input parameter as ContactID

Return parameter : GetCustomers(contactID,firstName,Lastname,Phone)

Also i have added a property called ContactID in user profile which I have used for mapping the BDC(1:1 mapping).

Then , I have created another profile property called MyLastName and mapped it to the LastName BDC connection field.

I have specified values for contactId to some user profiles.Then , after doing the "Full Import" , the MyLastName property is not getting populated.

Please provide guidence .. Its urgent!!

Awaiting for your reply.. Thanks in advance!!

On 3/26/2008 2:12:17 PM Marcelo said ..
Hi there

I am having the following problem.

When I check the users profiles for a couple of users in the "Shared Services Administration: SharedServices" I see that the title is correct, meaning it has been correctly updated from Active Directory. Now once I am on the sharepoint site and I do a search on the employee list, the data is outdated.

Any ideas on what could be causing the problem?

Thank you.

On 3/27/2008 12:09:35 PM Paula said ..

I'm having the same problem. I read somewhere that SP1 solves the problem but I don't feel like installing it right now... Is there another solution?

Thanks a lot!

On 3/27/2008 6:31:00 PM Marcelo said ..
Hi Paula;

In my particular case, when I go to the "Employee Lookup" i find people that do not exist anymore, Of course, when I click on the results, I get user not found. I think that there is some type of index keeping these records, but can't find out where.

I hope someone can help us out with this.


On 7/22/2008 2:24:55 AM Saurabh said ..
Hi Sahil.....I opened my SharedServices and Clicked on "UserProfiles and Properties" it gives an error....that is "An error has occurred while accessing the SQL Server database or the Office SharePoint Server Search service. If this is the first time you have seen this message, try again later. If this problem persists, contact your administrator."

can u plz tell me how can i remove this Error

On 7/24/2008 1:29:03 PM Sree said ..
We have same user in different sources. Different sources has different information and I need to bring them all together in to MOSS profile. Will creating different import connections is the way to go? There are some properties exist on multiple systems such as firstname, email etc. How does import handles them?

On 8/6/2008 8:22:49 AM Jane said ..
I have successfully imported userids from Active Directory, but some of them did not have an email associated with them. I have now updated the email address for these people in Active Directory, done a full import in SharePoint, but the email addresses are not showing up in SharePoint, so these people cannot set alerts or receive workflow emails. What do I need to do to get these email addresses to be imported into SharePoint?

On 8/25/2008 2:41:16 PM Jeff said ..
How do you limit the import of users to a specific OU? I want data imported only for actual users and not other accounts.

On 8/26/2008 4:55:49 AM ashish phatak said ..

can some 1 help me i solving dis problem....?

I ahve to add users from Active Directory in sharepoint groups....(only add thos e emplyess whose designation is PM)

On 10/15/2008 12:04:15 PM Tammy said ..
To limit import of users to a specific OU:

Go to Shared Service Administration, then user profiles/properties and configure profile import. Select Custom Source then view import connections. (Create a new AD connect or edit the current one if you already have one setup)

In the search base box, type in OU=OuName,DC=Domain,DC=com

tweak whatever other settings you want, and you should be good to go...

On 10/17/2008 10:01:51 AM Kweku said ..
I have imported users from Active Directory into MOSS 2007 but when a user tries to log in this is what we get.

Error: Access Denied. You are currently signed in as:

Any ideas on how to fix this will be greatly appreciated.

On 10/28/2008 1:34:58 PM omar said ..
hey sahil i just want to let you know "YOU ARE THE BEST".

I read your articles on BDC they are good .

Thanks for the good work.

On 11/5/2008 11:37:59 AM David said ..
I have the same problem as Jane. It didnt import the email address, so i added it in the mysite, but it does not show up in the sharepoint site. It says the user has no email address and i cannot edit that field anywhere.

Please help

On 11/26/2008 10:26:56 AM kriks said ..
Hi, if i have configured a automatic import connector like this: search base:OU=Sales,OU=London,CN=contoso,CN=COM and userfiter as default:(&(objectCategory=Person)(objectClass=User)). And there are changes in AD, OU-s will be rearranged. Lets say: OU=Sales,OU=London,CN=contoso,CN=COM will become OU=Sales,OU=South,OU=Bristol,CN=Contoso,CN=COM. How will this affect the users whos profiles are already imported to Sharepoint?

I have to make change in automatic import connector for it to import new users, that goes without saying, but will the already imported profiles work also?

Thank you

On 2/3/2009 5:26:11 PM John Dieter said ..
Can you import a GROUP from active directory? Can I create a group on the domain like SharepointManagers and then configure an LDAP connection to bring that group into sharepoint such that I can select the group in a people or group drop down?

On 5/14/2009 4:38:27 AM Ghalia said ..
I imported users from two ADs, AD1 and AD2, AD1 is the AD for farm of MOSS, and import works fine, when i try to login to the other domain AD2 users or add user message: The user does not exist or is not unique. what shall i do to solve this ?? if i use AD1 domain nothing happened

On 6/26/2009 1:44:29 AM kiran said ..

i have imported ldap users to user profiles. but am not able to add this users to site.

please tell me solution it will be grate.

thanks in advance


On 12/8/2009 10:19:20 PM Mark said ..
Regarding the error on the User Profiles and Properties page "An error has occurred while accessing the SQL Server database ..."

May I suggest you check out the entry I just added to my blog:

On 4/5/2010 4:45:43 PM Anu said ..
I am able to pull BDC related data in the web part but when trying to add BDC as a column in the list, system is saying "There are no Business Data Catalog "

Am using the same user and has all permissions set.

Wondering if you can shed some light on this ?


On 4/7/2010 9:19:38 AM Mallikarjun said ..
Hi Sahil,

I followed the steps mentioned by u and able import the user profiles from AD, but none of the AD groups(Security Groups) got imported(Which i verifed by filtering the logs by PEOPLE_DL_IMPORT), which i wanted to use in Audience targetting. This behaviour is not same in all the MOSS installation i have, this happening in couple of machines.

On 5/10/2010 9:54:11 PM Kunal said ..
I am getting a absurd error

I am not able to add user in to the Sharepoint Site

Althoough i added the same user in the Different site in the same farm

It gives me error as USernot found or Unique



On 5/28/2010 2:14:50 AM Saran said ..

I want to import Computer Names from AD into SharePoint. Could you please check and help on this ?


On 6/8/2010 11:07:43 AM Jason said ..
Thank you! This is exactly what I was trying to figure out, and your article made my life a lot easier.

Much appreciated!

On 7/3/2010 6:54:00 AM Rick said ..
Great post...thanks for the info !

On 7/19/2010 2:02:47 PM Neel said ..
Great post!

I have aquestions:

my sync with AD is working fine except it is not pulling the pictures in the AD.

Here is my issue, we have photos of all employees stored as xyz.jpg in the custom attribute (emp_pics_2001) with type string, but the picture url type is url (is this the culprit type change), I am using the custom attribute to map the field in the Sharepoint 2010 miis client.

I am using the below url to do the set up:

i did check the profile db picture url field is NULL, i have all the other values for person except the picture.. , I have already wasted more than 2 days in figuring this out

If i just get xyz.jpg pulled to sharepoint, then i can prefix a url in front of it using powershell

I am using a full trusted service account with full permissions to the domain

please help me out..

thank you


On 3/23/2011 5:22:14 AM SrikanthS said ..

I have the following scenario.

User profiles are available in Farm-1, and mysites are available in Farm-2.

I want to move mysites from Farm-2 into Farm-1.

Which means userprofiles and mysites into the Farm-1.