0
votes

Is it possible to create my site programmatically in SharePoint 2010?

  1. I have added 5 users to AD (Active Directory).
  2. These 5 users are also added in an excel file.
  3. SharePoint 2010 sample site contains a web page where it takes an input as above excel file and on click of a button I want to create 5 my sites of those users specified in excel file with some list, document libraries already created on those my sites.

Is it possible to achieve this functionality in SharePoint 2010? At present I am looking for a code snippet which will use SharePoint 2010 object model and fulfills this requirement.

1
Specifically I am not worried about the excel operation or web part. I just wanted to know is it possible to programmatically do anything with my site of a logged in user.Tejas

1 Answers

1
votes

The UserProfile.CreatePersonalSite method creates a personal site (My Site) for a user.

Various methods and properties of the UserProfile class can then be used to access the site, user's colleagues, quick links, etc.