private async Task GetUsers(LdapSettings settings) { try { Users = await LdapService.GetUsersAsync(settings); ActiveDirectoryInitialization = ActiveDirectoryInitialization.Loaded; StateHasChanged(); } catch (Exception ex) { Logger.LogError(ex.Message); await ToastService.ShowToastAsync(ex.Message, ToastType.Error); await ModalDialogService.CancelAsync(); } }