public override string GetUserId(Controller controller)
 {
     return(_setupBusiness.GetClientEmail(_lea));
 }
        public async Task <JsonResult> TestConnection(CancellationToken cancellationToken)
        {
            var lea     = _sessionInfo.CurrentAgencyId.GetValueOrDefault();
            var gcEmail = _setupBusiness.GetClientEmail(lea);

            if (string.IsNullOrWhiteSpace(gcEmail))
            {
                return(Json(new TestConnectionMessage {
                    Connected = false, Message = "Google Classroom setup not completed"
                }, JsonRequestBehavior.AllowGet));
            }

            var task = await Task.Run(async() => await GcSync.TestAsync(this, lea, gcEmail, _setupBusiness, cancellationToken).ConfigureAwait(true));

            return(Json(task, JsonRequestBehavior.AllowGet));
        }