0

I try to use the python pyad module to query my Active Directory.

from pyad import *
pyad.set_defaults(ldap_server="xxx", username="xxx", password="xxx")
q = pyad.adsearch.ADQuery()

That code will produce this error:

com_error: (-2147352567, 'Exception occurred.', (0, 'Microsoft OLE DB Service Components', 'The parameter is incorrect.', None, 0, -2147024809), None)

I have found one article describing a bug which I tested but it does not help: https://github.com/zakird/pyad/issues/49

Can anyone help understand what the problem is?

Gabriel Luci
  • 38,328
  • 4
  • 55
  • 84
  • Did you try [this](https://github.com/zakird/pyad/issues/49#issuecomment-307914470) solution? "At line 38 in `adquery.py`, the `Open()` function had `"Provider=ADSDSOObject"` as it's parameter. Changing the parameter to `""` allowed the code to continue as normal." – Gabriel Luci Jan 20 '20 at 13:50
  • Thanks, yes i tried it but it did not work. Im clueless.... – Tyngd Punkt Jan 20 '20 at 18:49

0 Answers0