pyad "a restriction violation has occurred"

0

I always get this error message. Recently my script still has worked, but I didn't change anything. I don't know why it suddenly crashes all the time. The problem cant be a wrong server or wrong credentials, because I can e.g. get information's from a can with pyad.aduser.ADUser.from_cn(). Thanks for help.

"Traceback (most recent call last):
  File "C:\Users\account\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyad\adcontainer.py", line 38, in create_user
    obj.SetInfo()
  File "<COMObject <unknown>>", line 2, in SetInfo
pywintypes.com_error: (-2147352567, 'Ausnahmefehler aufgetreten.', (0, 'Active Directory', 'Es ist eine Beschränkungsverletzung aufgetreten.\r\n', None, 0, -2147016657), None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:/Users/account/Desktop/auto ad version 2/adbot.py", line 52, in <module>
    pyad.aduser.ADUser.create(name, ou)
  File "C:\Users\account\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyad\aduser.py", line 12, in create
    return container_object.create_user(
  File "C:\Users\account\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyad\adcontainer.py", line 47, in create_user
    pyadutils.pass_up_com_exception(e)
  File "C:\Users\account\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyad\pyadutils.py", line 58, in pass_up_com_exception
    raise WIN32_ERRORS.get(info['error_num'], win32Exception)(error_info=info, additional_info=additional_info)
pyad.pyadexceptions.win32Exception: 0x8007202f: Es ist eine Beschränkungsverletzung aufgetreten."
python
pyad
asked on Stack Overflow Feb 5, 2021 by share_your_code • edited Feb 6, 2021 by Jakub Szlaur

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0