When excuting this query below

SELECT *
FROM OPENQUERY( ADSI,
'SELECT Name, SN, ST
FROM ''LDAP://xxxx.local,DC=AAAAA4,''
WHERE objectCategory = ''Person'' AND
objectClass = ''user''')

I receive the error message:

Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing the query "SELECT Name, SN, ST
FROM 'LDAP://xxxx.local,DC=AAAAA4,'
WHERE objectCategory = 'Person' AND
objectClass = 'user'" for execution against OLE DB provider "ADSDSOObject" for linked server "ADSI".


I've tried setting "Be made with this security context" But that didn't help and the login is a Domain account on the LDAP/AD server. What is that I'm missing or doing wrong?