private static async Task <JobSubmitResponse> SubmitJobAsync(string sandbox, string scid, string xuid)
        {
            var job = new JobSubmitResponse();

            using (var submitRequest = new XboxLiveHttpRequest())
            {
                var requestMsg = new HttpRequestMessage(HttpMethod.Post, new Uri(baseUri, "submitJob"));

                var requestContent = JsonConvert.SerializeObject(new JobSubmitReqeust(scid, xuid));
                requestMsg.Content = new StringContent(requestContent);

                string eToken = await Auth.GetETokenSilentlyAsync(scid, sandbox);

                AddRequestHeaders(ref requestMsg, eToken);

                var responseContent = await submitRequest.SendAsync(requestMsg);

                // remove "" if found one.
                job.JobId         = responseContent.Content.Trim(new char[] { '\\', '\"' });
                job.CorrelationId = responseContent.CollrelationId;

                Log.WriteLog($"Submitting delete job for scid:{scid}, user:{xuid}, sandbox:{sandbox} succeeded. Jobid: {job.JobId}");
            }

            return(job);
        }
        private static async Task <JobStatusResponse> CheckJobStatus(JobSubmitResponse job)
        {
            using (var submitRequest = new XboxLiveHttpRequest())
            {
                var requestMsg = new HttpRequestMessage(HttpMethod.Get, new Uri(baseUri, "jobs/" + job.JobId));
                if (!string.IsNullOrEmpty(job.CorrelationId))
                {
                    requestMsg.Headers.Add("X-XblCorrelationId", job.CorrelationId);
                }

                string eToken = await Auth.GetETokenSilentlyAsync(string.Empty, string.Empty);

                AddRequestHeaders(ref requestMsg, eToken);

                var response = await submitRequest.SendAsync(requestMsg);

                string responseConent = await response.Content.ReadAsStringAsync();

                var jobstatus = JsonConvert.DeserializeObject <JobStatusResponse>(responseConent);

                Log.WriteLog($"Checking {job.JobId} job stauts: {jobstatus.Status}");

                return(jobstatus);
            }
        }