Skip to main content

Posts

Showing posts from August, 2015

Method to provision personal sites and OneDrive for Business for multiple users in Office365

As part of new employee workflow from within the identity management we needed to pre-provision Personal sites and OneDrive for Business. After doing a quick research, I found the following article on the #msdn https://msdn.microsoft.com/en-us/library/office/jj163783.aspx which describes how using CSOM one can achieve the task. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Security; using Microsoft.SharePoint.Client; using Microsoft.SharePoint.Client.UserProfiles; namespace CreatePersonalSiteBulkConsole { class Program { static void Main( string [] args) { string userName = "administrator@contoso.onmicrosoft.com" ; string passwordStr = "password" ; string serverUrl = "https://contoso-admin.sharepoint.com/" ; using ( var clientContext = new ClientContext(serverUrl))