R – Populate a SharePoint Site with Users/Groups from AD

mosssharepointsharepoint-2007

I have created a SharePoint (MOSS 2007) site template, and I am programmatically creating a number of new site based on this template. I would like to populate each site created with this template with a number of users and groups from the Active Directory. Can anyone offer any guidance on how this can be done, either as part of the site template, or through code?

Thanks, MagicAndi.

Best Answer

Have a look at this article, it shows 3 different ways of adding users.

MOSS: Add user to site through code (programmatically)