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