Removing ldap users

Hello, just recently migrated over from owncloud to nextcloud. We were having an issue of active directory users from a specific nextcloud group to login. We got it to work, however instead of just using the nextcloud group, it imported all the users in Active Directory. How can I get rid of all other other Active Directory (Ldap) users that were imported and in the nogroup status, but not delete the AD users that are in the nextcloud group. I tried to delete individually but it did not let me. You help is greatly appreciated, thanks.

Ray