8
Views
1
Comments
[Active Directory Library] ObjectCategory vs ObjectClass
Question
active-directory-lib
Service icon
Forge asset by Renato Pauleta
Application Type
Service

Hello,

I am using this extension but I am not getting any results, no matter which filter I try. Looking into the code, it appears that each filter type uses the expression "&(objectCategory=User)(objectClass=person)".

Looking into Microsoft's documentation, isn't this reversed from what it should be? Or am I misunderstanding how the queries work?

To query for a user, the query must contain the search expression "(&(objectClass=user)(objectCategory=person))".

https://learn.microsoft.com/en-us/windows/win32/ad/querying-for-users

2023-01-19 12-23-07
Abhinav Shilwant

Hi @Dan Kozlowski

It looks like the issue you’re facing with the Active Directory extension in OutSystems might be due to the LDAP query string used in the extension. The typical format to query a user in Active Directory via LDAP should indeed be (&(objectClass=user)(objectCategory=person)). This format ensures that the query filters for entries where the object class is ‘user’ and the object category is ‘person’.

From your description, it seems that the filter being used in the extension might be reversed or incorrectly formatted, as you noted. If the query is not returning results, it could be because it is not formatted to properly filter the intended objects in the Active Directory.

I recommend checking the query string in the extension code to confirm it matches the standard LDAP query format for users. If it is incorrect, modifying it to the correct format should resolve the issue. If you continue to experience problems, it might be helpful to look at the LDAP logs or use an LDAP browser to test the query directly against your Active Directory to ensure that it is correctly retrieving users.

Hope this helps!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.