class Program { static void Main(string[] args) { var siteUrl = "https://123.sharepoint.com/"; var userName = "account"; var password = "****"; AuthenticationManager authManager = new AuthenticationManager(); using (var ctx = authManager.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userName, password)) { var web = ctx.Web; ctx.Load(web); ctx.ExecuteQuery(); string sourceFile = "site/Document%20Lib/11/test.zip"; string destinationPath = "site/Document%20Lib/22"; var createJobInfo = ctx.Site.CreateCopyJobs(new string[] { sourceFile }, destinationPath, new CopyMigrationOptions() { IsMoveMode = false, IgnoreVersionHistory = true, AllowSchemaMismatch = true, NameConflictBehavior = MigrationNameConflictBehavior.Replace }); ctx.ExecuteQueryRetry(); Dictionary eventsFound = new Dictionary(); bool jobEndFound = false; while (!jobEndFound) { var progress = ctx.Site.GetCopyJobProgress(createJobInfo[0]); ctx.ExecuteQuery(); foreach (string log in progress.Value.Logs) { CopyJobProgress progressRes = (CopyJobProgress)JsonConvert.DeserializeObject(log, typeof(CopyJobProgress)); if (!eventsFound.ContainsKey(progressRes.Event)) { Console.WriteLine(DateTime.Now + " - " + progressRes.Event + " - CorrelationId: " + progressRes.CorrelationId); eventsFound[progressRes.Event] = progressRes; } if (progressRes.Event == "JobEnd") { jobEndFound = true; } } if (!jobEndFound) System.Threading.Thread.Sleep(2000); } } } } class CopyJobProgress { public string Event; public string JobId; public string CorrelationId; }