Date based attributes all return None.
p2pgirl opened this issue · 1 comments
When I try to adquery or pull an attribute that has a date involved (such as lastLogon, lastLogoff, or even a log off method... the attribute always comes up None. However other attributes seem to work. What am I doing wrong?
user1=aduser.ADUser.from_cn("Cinque Brown")
date=user1.get_last_login() //comes back as nonetype
Traceback (most recent call last):
File "<pyshell#80>", line 1, in
date=user1.get_last_login()
File "C:\Users\administrator.RESOURCECENTER\AppData\Local\Programs\Python\Python39\lib\site-packages\pyad\adobject.py", line 407, in get_last_login
return pyadutils.convert_datetime(self.get_attribute('lastLogonTimestamp', False))
File "C:\Users\administrator.RESOURCECENTER\AppData\Local\Programs\Python\Python39\lib\site-packages\pyad\pyadutils.py", line 71, in convert_datetime
high_part = int(adsi_time_com_obj.highpart) << 32
AttributeError: 'NoneType' object has no attribute 'highpart'
I'm experiencing this same issue. Did you happen to solve it?