locked
How to Get Active Directory users in to SharePoint List. RRS feed

  • Question

  • Hi All,

       I want to Create a List Which should only have Active directory Users,and If i Add a new user through this list It should reflect the Active directory as well..

    Is there any way to do that?

    Tuesday, October 1, 2013 7:39 AM

Answers

  • Hi,

    Your account must be part of "Active Directory Admin Group" to add the new user to it and synchronizing the user list to your SharePoint list.

    Code can be available on my blog

    http://intelliview.blogspot.in/2010/12/sharepoint-active-directory-synchronize.html


    Murugesa Pandian.,MCTS|App.Devleopment|Configure

    Tuesday, October 1, 2013 8:09 AM
  • Hi Ali, 

    To achieve this objective, "If i Add a new user through this list It should reflect the Active directory as well", you will need to write some custom code (or use a workflow) that checks if the user being added to the list is in Active Directory, and if not, create it. You would also need to set the field you are going to use for the user as unique, so that a user can only be added once. 

    If you also want to keep that list up to date with all the users in Active Directory, then you would need some sort of synchronisation mechanism (probably a timer job) to add any new users in Active Directory (that aren't already in the list) to the list. 

    I wrote a TechNet Wiki article on accessing Active Directory via code, which may give you some pointers. You can see it here: http://social.technet.microsoft.com/wiki/contents/articles/19115.sharepoint-querying-active-directory-from-a-farm-based-solution-using-c-net.aspx


    Regards, Matthew
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here: Upload and Crop User Profile Photos

    Tuesday, October 1, 2013 8:55 AM

All replies

  • Hi,

    Your account must be part of "Active Directory Admin Group" to add the new user to it and synchronizing the user list to your SharePoint list.

    Code can be available on my blog

    http://intelliview.blogspot.in/2010/12/sharepoint-active-directory-synchronize.html


    Murugesa Pandian.,MCTS|App.Devleopment|Configure

    Tuesday, October 1, 2013 8:09 AM
  • Hi Ali, 

    To achieve this objective, "If i Add a new user through this list It should reflect the Active directory as well", you will need to write some custom code (or use a workflow) that checks if the user being added to the list is in Active Directory, and if not, create it. You would also need to set the field you are going to use for the user as unique, so that a user can only be added once. 

    If you also want to keep that list up to date with all the users in Active Directory, then you would need some sort of synchronisation mechanism (probably a timer job) to add any new users in Active Directory (that aren't already in the list) to the list. 

    I wrote a TechNet Wiki article on accessing Active Directory via code, which may give you some pointers. You can see it here: http://social.technet.microsoft.com/wiki/contents/articles/19115.sharepoint-querying-active-directory-from-a-farm-based-solution-using-c-net.aspx


    Regards, Matthew
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here: Upload and Crop User Profile Photos

    Tuesday, October 1, 2013 8:55 AM