Disable user using pyad
pythoncyberyst opened this issue · 0 comments
pythoncyberyst commented
Hello!
I am trying to disable a user using a Domain Admin with the following code in python3:
`import pyad.adobject as adobject
import pyad.aduser as aduser
user_object = aduser.ADUser.from_dn("CN=Bruce Wayne,OU=Users,OU=OuU-2222,OU=OuUnits,DC=domain,DC=name")
adobject.ADObject.disable(user_object)`
when i run the code, i am getting this error:
0x80070005: Access is denied.
0x8000500d: The property cannot be found in the cache. Verify that attribute exists for particular object.
Does anybody know what this error means?
Thanks!