-
Looks for the users who have the role
user. -
Uses Box Events to check if the user performed any actions for a specified number of days. The default list of event types includes:
LOGIN,UPLOAD,COPY,MOVE,PREVIEW,DOWNLOAD,EDIT,DELETE,UNDELETE,LOCK,UNLOCK,NEW_USER. You can modify this list in the script settings. -
Adds users who didn’t perform any actions to a
.csvfile with inactive users. You can use this file as input for other scripts, for example to deprovision users.
Prerequisites
Windows
Install the latest version of dotnet core.MacOS & Linux
Install PowerShell. Run thepwsh command to test the installation.
Box CLI
To use the script, you will need the Box CLI installed and configured. You can get this done by going through our quick start guide. The user you use to login with should be the main Box admin or co-admin.Configure the script
-
Clone the
boxcliGitHub repository and cd into this example’s folder or download the files fromexamplesdirectory. -
Set the number of days you want the script to scan for user events. If you don’t specify this value or leave the default, the script will prompt you to enter it.
-
(Optional) To change the report output file name, define the
ReportOutputFileparameter. -
(Optional) To change event types, define the list for
eventTypeparameter.
Run the script
Run the Powershell command.Logging
Logs are stored in thelogs folder located in the main folder.
You have access to these log files:
Inactive_Users_Report_all.txtthat contains all log entriesInactive_Users_Report_errors.txtthat contains only errors.
