- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
11-26-2022 12:31 AM
Hi All
How can i export the list of users along with their last login
In Seetings > User and Role > Users I am able to see the list of users
But i dont see an option to export this data
I want to export them to review each of them and get approval
Thank you
aparna
11-28-2022 07:57 AM
You can do this using the getUsers builtin command, and adding extend context to pull the full data into context. Then the ExportToCSV automation:
!getUsers extend-context=Users=. (Exports everything to the Users key in context using the extend-context option, the default doesn't return the last login of the user.)
!ExportToCSV fileName=xsoarusers.csv csvArray=${Users} headers=email,lastLogin,roles,username (exports the Users key to CSV, the headers option is optional, if you don't use it it will export all the keys as headers.)
11-29-2022 12:24 AM - edited 11-29-2022 12:24 AM
When Try the 2nd command, i am getting the below error
Error from Scripts is : Missing argument values for command ExportToCSV are : csvArray (7)
11-29-2022 09:16 AM
Well, what is the Users key in context? Is it an array? Does it exist? do you have more than one user in the system? What troubleshooting did you perform?
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!