Skip to main content
Question

I am trying to get User ACTIVE and EMAIL ID in company using LDAP.

  • September 12, 2025
  • 4 replies
  • 37 views

Forum|alt.badge.img+1

Hi All,

I am trying to get the active employee status and email from the company, I have used below qurey to get the Active employee status but unable to get the email id, Can someone please help me with right query for using LDAP in A360.

 

 

(&(objectCategory=person)(objectClass=user)(displayName=$rEmployeName{"WEARER NAME"}$)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
 

4 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • September 12, 2025

@prpogaku Maybe try this for your AD query:

(&(objectCategory=person)
  (objectClass=user)
  (displayName=$rEmployeName{"WEARER NAME"}$)
  (!(userAccountControl:1.2.840.113556.1.4.803:=2))
  (mail=*))

That should return the mail attribute.


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • September 13, 2025

Thank you for the response, @Aaron.Gleason. I have tried the provided query and also experimented with some variations. However, the results shown in the message box currently only display the employee name (e.g., “Steve Scot”). I am looking to also retrieve and display the email ID alongside the username in the message box.

Could you please advise or provide an example on how to include both the user status and email ID in the output? Any guidance on how to fetch and display these multiple LDAP attributes properly in Automation 360 would be greatly appreciated.

(&(objectCategory=person)(objectClass=user)(displayName=Steve Scot)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(mail=*))

I am looking for below two things:

  1. User status (Which already I'm getting)
  1. Email id for the same user( If the user is active in the company).

 

 

Thanks again for your help!


Shreya.Kumar
Pathfinder Community Team
Forum|alt.badge.img+14
  • Pathfinder Community Team
  • October 7, 2025

@prpogaku were you able to find a workaround?


Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • October 8, 2025

Hi ​@prpogaku,

 

Try the below query once.

(&

  (objectCategory=person)

  (objectClass=user)

  (displayName=$rEmployeName$)

  (userAccountControl=*)

  (!(userAccountControl:1.2.840.113556.1.4.803:=2))

  (|(mail=*)(proxyAddresses=smtp:*))

)

 

  • Use with attributes to return: displayName,mail,proxyAddresses,sAMAccountName,userPrincipalName,userAccountControl.
  • Primary email resolution: prefer mail; else parse proxyAddresses and pick the SMTP: entry.