Closed Charannm closed 5 years ago
need to create users but i did not get 'lastname' and 'office' optional attribute names Please help me
from pyad import * ou = pyad.adcontainer.ADContainer.from_dn("ou=ProductionUsers, dc=test, dc=com") new_user = pyad.aduser.ADUser.create("charan M", ou, password="Test@21234",enable=True,optional_attributes={'mail':"charan.nm@test.com", description":"12876", 'sAMAccountName':"charan12876",'userPrincipalName':'charan12876@test.com',"displayName":"charanNM", 'givenname':'charan','initials':'M'}) new_user.update_attribute('PwdLastSet',0)
need to create users but i did not get 'lastname' and 'office' optional attribute names Please help me
from pyad import * ou = pyad.adcontainer.ADContainer.from_dn("ou=ProductionUsers, dc=test, dc=com") new_user = pyad.aduser.ADUser.create("charan M", ou, password="Test@21234",enable=True,optional_attributes={'mail':"charan.nm@test.com", description":"12876", 'sAMAccountName':"charan12876",'userPrincipalName':'charan12876@test.com',"displayName":"charanNM", 'givenname':'charan','initials':'M'}) new_user.update_attribute('PwdLastSet',0)