zakird / pyad

Python Active Directory Tools | *Not actively maintained*
http://zakird.github.io/pyad/
176 stars 72 forks source link

what is optional attributes name for 'Lastname' and "office"? #94

Closed Charannm closed 5 years ago

Charannm commented 5 years ago

need to create users but i did not get 'lastname' and 'office' optional attribute names Please help me

image

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)