public async Task <ActionResult> InspectionDetails(DashboardInspectionDetailsViewModel model) { var sharePointToken = await O365Util.GetAccessToken(ServiceResources.DemoSite); var service = new TasksService(sharePointToken); await service.CompleteRepairAssignmentTask(model.incidentId); var dashboardModel = new Dashboard(sharePointToken); var calendarEvent = await dashboardModel.ScheduleRepair(model); await O365CalendarController.Create(calendarEvent); return(RedirectToAction("InspectionDetails", new { id = model.incidentId })); }