Python pyad module can't set UPN -
i using pyad module in order create active directory. have 1 issue, not able set upn suffix @mycompany.local
here code :
new_user = pyad.adcontainer.aduser.create("hugo test", ou, password="passw0rd", upn_suffix="@mycompany.local", optional_attributes = {"samaccountname":"htest","userprincipalname":"htest","givenname":"hugo","sn":"test","displayname":"hugo test"})
the user created without issue, upn suffixes remain empty on active directory.
active directory : 2012 pyad : 0.5.15 ptyhon : 3.5.2
any idea on going wrong ?
ok, answer own question. solved setting upn suffix in userprincipalname code looks :
new_user = pyad.adcontainer.aduser.create("hugo test", ou, password="passw0rd", upn_suffix="@mycompany.local", optional_attributes = {"samaccountname":"htest","userprincipalname":"htest@mycompany.local","givenname":"hugo","sn":"test","displayname":"hugo test"})
Comments
Post a Comment