public async Task ExecuteAsync() { //basically, for all clients, all directories, get ldap user based on filter then //import ones not in the system. Nothing else. //Get all clients var clients = await _clientManager.GetAll(); foreach (var client in clients) { //Get directories for client var directories = await _directoryManager.GetDirectoriesAsync(client.Id); foreach (var directory in directories) { //Get Ldap info for directory var ldapDomain = await _directoryManager.GetDirectoryLdapAsync(directory.Id); if (ldapDomain == null) { break; } //find all users from the ldap based on filter _ldapService.LdapConfig = ldapDomain; var ldapUsers = _ldapService.SearchUsersPaged(_userFilter); //process all the ldap users returned. ProcessUsersFromLdap(ldapUsers); } } throw new NotImplementedException(); }