private async void GetUsers() { await _accountsViewModel.GetUsers(_homesViewModel.SelectedHome.HomeId); foreach (Home Home in _accountsViewModel.Homes) { Homes.Add(Home); } //if (ApplicationData.Current.LocalSettings.Values.ContainsKey("accountid")) //{ // WebAccountProvider provider = await WebAuthenticationCoreManager.FindAccountProviderAsync(MicrosoftAccountProviderId, ConsumerAuthority); // String accountID = (String)ApplicationData.Current.LocalSettings.Values["accountid"]; // WebAccount account = await WebAuthenticationCoreManager.FindAccountAsync(provider, accountID); // WebTokenRequest webTokenRequest = new WebTokenRequest(provider, "user.read", "none"); // WebTokenRequestResult webTokenRequestResult = await WebAuthenticationCoreManager.RequestTokenAsync(webTokenRequest, account); // if (webTokenRequestResult.ResponseStatus == WebTokenRequestStatus.Success) // { // string token = webTokenRequestResult.ResponseData[0].Token; // GetUser(token); // } //} }