I'm trying to create a script to go through and find all the accounts in my AD that have an expiration date, and that date is today. The script will then go over to Canvas LMS and disable that account, and gmail, and some other non-SSO accounts. It will also wipe out their Papercut info, and IP phone numbers and stuff.
I can find all the accounts that I want, and I can disable them using this
conn.modify(dataframe['DN'][d], {'userAccountControl': [('MODIFY_REPLACE', 2)]})
It's a Pandas dataframe passed into a function. But if I try to multiple items, it doesn't seem to work.
conn.modify(dataframe['DN'][d], {'userAccountControl': [('MODIFY_REPLACE', 2)],
'telephoneNumber': [('MODIFY_REPLACE', '')]})
This fails.
Ideas?
conn.modify(dataframe['DN'][d], {'userAccountControl': [('MODIFY_REPLACE', 2)],
'telephoneNumber': [('MODIFY_REPLACE', '')]})