Reputation: 2407
I am integrating with 3rd party LDAP where some sAMAccountName contains spaces e.g sAMAccountName=Ishan Liyanage
Is there any possibility that I can exclude sAMAccountName with spaces while searching?
I know I can use logical not to exclude those, but it not an option as there so many with spaces
Upvotes: 0
Views: 1395
Reputation: 94749
Well you can add the logical negation of spaces using an additional search term like:
!(sAMAccountName=* *)
but, TBH, why such a restriction - is it for linux interop? If that's the case then you can use the uid
field or the prefix of the principal name: userPrincipalName=<user>@*
Upvotes: 1