async private void Login_Click(object sender, RoutedEventArgs e) { //// Do sign-in logic here and store your authentication token using the AppSettings class App.MyAppSettings.AuthTokenSetting = ServerApi.GetAuthTokenFromWebService(); App.MyAppSettings.UserIdSetting = ServerApi.GetUserIdFromWebService(); // log existing bindings { ContactBindingManager manager = await ContactBindings.GetAppContactBindingManagerAsync(); foreach (ContactBinding binding in await manager.GetContactBindingsAsync()) { Logger.Log("MainPage", "existing binding = " + binding.RemoteId); } } // Add contact bindings for every contact information that we get from the web service // This bindings will be automatically linked to existent phone contacts. // The auto-linking is based on name, email or phone numbers match. await CreateContactBindingsAsync(); // log new bindings { ContactBindingManager manager = await ContactBindings.GetAppContactBindingManagerAsync(); foreach (ContactBinding binding in await manager.GetContactBindingsAsync()) { Logger.Log("MainPage", "binding = " + binding.RemoteId); } } MessageBox.Show("Done!"); }