Auto archive inactive accounts
AnsweredHow do i auto archive inactive accounts? Is there a script that can be used?
-
Official comment
Hi!
Can you explain what you mean by "archive" ... Do you mean the content? Or the user account?
Thanks,
Alex, Box Developer Advocate
Comment actions -
So, I want to place all the content for inactive users into another account so we consume only one license for all previous users and we can take previous user content offline, eventually, after no access for 30 - 60 days perhaps.
I can inactivate accounts based on our own, eligibility requirements. I have code to do this, written against Ruby api.
For every inactive user, transfer their account contents to grp-stale-archive. Then after copy is made, delete the inactive user's account. From the admin console UI you can do this. I would like to do it by handing a program, which I can write with python API, a list of boxid's for inactive users, or just their Primary email addresses.
Does this make sense now?
-
Thank you for the additional clarification!
I would use our transfer owned content endpoint followed by the delete user endpoint. The python sdk has methods for both of these.
Hope this helps,
Alex, Box Developer Advocate
-
When i try to transfer the contents of the account (source) to final account(destination), it comaplins that the user is inactive.....and that is true. Can I make the status of the source account actiove before I transfer the content. How? What is the API call to do this? Will it work in the milliseconds between the call to activate and the very next call to transfer content? I also sent email with the code I am using. It works find, as long as the source account is active. I would like to re-activate these users, transfer content using code also.
Please sign in to leave a comment.
Comments
5 comments