//ProvisionDemoData page view
 public async Task<ActionResult> ProvisionDemoData()
 {
     var graphService = await AuthenticationHelper.GetGraphServiceAsync(); // Prepare Graph Service in advance.
     SuiteLevelWebApp.Models.ProvisionDemoData model = TempData["datetime"] as SuiteLevelWebApp.Models.ProvisionDemoData;
     if (TempData["datetime"] == null)
     {
         model = new SuiteLevelWebApp.Models.ProvisionDemoData();
     }
     return View(model);
 }
        //ProvisionDemoData page view
        public async Task <ActionResult> ProvisionDemoData()
        {
            var graphService = await AuthenticationHelper.GetGraphServiceAsync(); // Prepare Graph Service in advance.

            SuiteLevelWebApp.Models.ProvisionDemoData model = TempData["datetime"] as SuiteLevelWebApp.Models.ProvisionDemoData;
            if (TempData["datetime"] == null)
            {
                model = new SuiteLevelWebApp.Models.ProvisionDemoData();
            }
            return(View(model));
        }
        public async Task <ActionResult> CreateDemoData(SuiteLevelWebApp.Models.ProvisionDemoData model)
        {
            var token        = AuthenticationHelper.GetAccessTokenAsync(AppSettings.DemoSiteServiceResourceId);
            var graphService = AuthenticationHelper.GetGraphServiceAsync();

            using (var clientContext = await AuthenticationHelper.GetDemoSiteClientContextAsync())
            {
                var siteProvisioning = new SiteProvisioning(clientContext);
                await siteProvisioning.AddSiteContentsAsync(new VideoPortalHelper(await token));

                siteProvisioning.UpdateInspectionAndIncidentListItems(model.DateDemo);
                await siteProvisioning.AddGroupsAndUsersAsync(await graphService);

                await siteProvisioning.CreateUnifiedGroupsForPropertiesAsync(await graphService);

                model.Message        = "The AAD Groups, AAD Users, and demo data have been created successfully.  The initial password for all the users is: TempP@ssw0rd!";
                TempData["datetime"] = model;
                return(RedirectToAction("ProvisionDemoData"));
            }
        }