Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Import User Profiles from Active Directory

  Asked By: Anil    Date: Feb 23    Category: Sharepoint    Views: 2085

Can you help me how to retrieve user profiles from active directory using .net code(sharepoint object library)
Actually my requirement is like we have sharepoint site.. from there i need to read all the user profiles to our oracle db using .net code.



3 Answers Found

Answer #1    Answered By: Himanta Barthakur     Answered On: Feb 23

There are possibly two types of information that you would like to move to Oracle

1. User information Stored in Active directory
2. User Profile information Stored in Sharepoint

for (1.) Information stored in Active Directory, there is a pretty standard API available, (I donot have time to paste the code  here, but you will find it easily if you google a little)

for (2.) if you need to move the User Profiles stored in Sharepoint (if some new fields have been added updated over and above the information from the Active directory), then only you need to access the Sharepoint Object Model,

You will need to access a List called "User Infomation List" where the Users are stored by default, enumerate all the Items and store them to your Oracle Database.
( Again I dont have time to paste the code here but.. to give you a hint, Classes that you will use are - SPsite, SPweb, SPlist, SPitem... google on them)

Haven't much tried them but try using Sharepoint Web services... might speecd up the process

Answer #2    Answered By: Mansi Revenkar     Answered On: Feb 23

i used sharepoint  webservice to captured properties of current user  logged in site  
why u want to connect AD as all the properties defined in AD can be imported into sharepoint userprofile and it is simple to retive from user and profile
u will have to add namespace microsoft.sharepoint.userprofile

Answer #3    Answered By: Lizette Mcconnell     Answered On: Feb 23

Check out


Didn't find what you were looking for? Find more on Import User Profiles from Active Directory Or get search suggestion and latest updates.