cancel
Showing results for 
Search instead for 
Did you mean: 

Complex AD Query

ak2766
Nimbostratus
Nimbostratus

I've seen THIS THREAD and although helpful in understanding the syntax, it did not help for my specific situation,

We have an IdP that authenticates users via their uid.  As such, I've configured the searchFilter as uid=%{session.logon.last.username} and this is currently working well.  However, I'm trying give the end user the flexibility of entering either sAMAccountName || email || uid.  I'm looking for something similar to this logic:

get details of user where %{session.logon.last.username} matches sAMAcccountName || email || uid
send uid of matched user to RADIUS

 If this is doable, how?

1 REPLY 1

Hello ak2766.

Have you tested with this sentence in your searchFilter field?

 

(|(uid=%{session.logon.last.username})(email=%{session.logon.last.username})(sAMAccountName=%{session.logon.last.username}))

 

Also, my recommendation is to use ldapsearch command to check if the query is getting all that you need and after that, translate it to the LDAP/AD query.

 

Regards,
Dario.