with user login find boxid using Python API
回答済みI have a lists of PrimarySMTPAddresses of box users I want to archive and disable. How to I get their boxids, knowing only their login
Is there something like the following?
this_user =client.user(login=primaryAddress).get()
userboxid = this_user.boxid
so I can do things like this.....
this_user = client.user(box_id).get()
(this_user.status != 'inactive'):
deactivated_user = deactivate_this_user.update_info({'status': 'inactive'})
-
正式なコメント
You'll want to get all enterprise users and filter on the login field, which is the given email address. This will give you the user ID back.
コメントアクション -
Can you please send some example code?
A few lines would probably be sufficient. How do I search all enterprise users and then just filter on a specific login id?
Is there a search call?
Yes, I have made a userDict before in python and gotten boxid by login.....but I would rather make one call with the method to search and filter than build all the 55thousand users into a dictionary.
-
users = client.users(filter_term='example@boxdemo.com')
for user in users:
print('{0} (User ID: {1})'.format(user.name, user.id))
サインインしてコメントを残してください。
コメント
3件のコメント