コード例 #1
0
ファイル: Program.cs プロジェクト: SyAbou/sharpointonline
        static void Main(string[] args)
        {
            // Instantiate the timer job class
            ExpandJob expandJobAppOnly = new ExpandJob();

            // specify the needed information to work app only
            expandJobAppOnly.UseAppOnlyAuthentication(ClientId, ClientSecret);

            // set enumeration credentials to allow using search API to find the OD4B sites
            expandJobAppOnly.SetEnumerationCredentials(User, Password);

            // In case of SharePoint on-premises use
            //expandJobAppOnly.SetEnumerationCredentials(User, Password, Domain);

            // Add one or more sites to operate on
            expandJobAppOnly.AddSite("https://bertonline.sharepoint.com/sites/2014*");
            expandJobAppOnly.AddSite("https://bertonline-my.sharepoint.com/personal/*");

            // Print timer job information and then call Run() on the job
            PrintJobSettingsAndRunJob(expandJobAppOnly);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Calisto1980/PnP
        static void Main(string[] args)
        {
            // Instantiate the timer job class
            ExpandJob expandJobAppOnly = new ExpandJob();
            
            // specify the needed information to work app only
            expandJobAppOnly.UseAppOnlyAuthentication(ClientId, ClientSecret);

            // set enumeration credentials to allow using search API to find the OD4B sites
            expandJobAppOnly.SetEnumerationCredentials(User, Password);

            // In case of SharePoint on-premises use
            //expandJobAppOnly.SetEnumerationCredentials(User, Password, Domain);

            // Add one or more sites to operate on            
            expandJobAppOnly.AddSite("https://bertonline.sharepoint.com/sites/2014*");
            expandJobAppOnly.AddSite("https://bertonline-my.sharepoint.com/personal/*");

            // Print timer job information and then call Run() on the job            
            PrintJobSettingsAndRunJob(expandJobAppOnly);
        }