Using API to get the Last Login by a User
Hello,
During our rollout of Box, it was Box Accounts for Everyone! But when the dust settled from the 1000 created Box account via bulk create, we had issues.
One of the issues that is coming back bite us in the backside is who has never logged into their Box account. I would like to clean out any accounts that have never been logged into on our Box system.
The Get User's Info API call has a "modified_at" data field. Does the "modified_at" data field tell when the last login to the Users Box account happened? Or does it mean something else? Does a blank field mean the Box account has never been logged into at all?
Also, if I am way off-base with the "modified_at" field, then is there information in an API call that tell when the last login date for a users?
Thank you in advance for your help.
Brett Watts
-
You can get the list of users who have logged into Box by querying the Enterprise Events API for login events.
-
Your info was good but I want to find out about accounts that were created 2+ years ago when we rolled out Box to out to our College Community. The documentation for the Enterprise Events had this wording:
Important
Box does not store all events for all time on a user account. We store events for between 2 weeks and 2 months, after which they are removed.
I don’t know if the Enterprise Events is what I am looking for when it comes to if my users have ever logged into their Box account.
My management wanted everyone to have a Box account so I did a Bulk Account Creation. However, some of the accounts were never open since it was during the summer when most of the Staff and Faculty are away. A lot of the accounts went beyond the two week expiration to log into the account so now I have a lot of accounts that get the “We’ve sent you a Confirmation Email” screen.
I want to find those people that have never logged into their Box account. Right now, I have to go individually starting with the reversed Last Logged display of the Managed Users in the Admin Console and see if I can login to each one. If I get the “Confirmation Email” screen, I make the assumption that they have never logged into their Box account. Since the Admin Console can sort by “Last Login”, I was hoping that an API call could give me the same information.
Is there an easier way to find what I want or do I need to do it one account at a time.
Let me know. Thank you for your help.
Brett
-
Brett,
Did you happen to figure this out?
From what i can tell, the modified_at does indeed update when a user logs in. However, according to the documentation it is "The time this user was last modified."
I also would love to have a "last logged in" field stored with the user object. The data is very clearly available in the UI and other places... so I would think it'd be simple to return it with the user object (unless "modified_at" does count as last logged in).
Post is closed for comments.
Comments
3 comments