Heya!
I am writing a script that will heavily automate our Atlassian cloud. Currently, I'm writing a function that will list all users and list their last login date and if the login date is older than 6 or more months user will be automatically disabled.
I saw that there is no way in retrieving such information for the user with JiraPS and Rest API (at least not to my knowledge and I did surf the web quite a lot to try and get the solution) but when you export the users to CSV you get that data. So I was wondering if there is any way to get the CSV via invoking a web request within the PowerShell? So I can work with that instead of getting the user by using JiraPS or Rest API
Thanks.
Hello Marta and welcome to the Community!
Thanks for sharing your ideas to create an automation process to manage your users within the cloud platforms. To confirm, you’re wanting to make a call using the REST API to return last login date/time of any user. With this said, it looks as this is not yet a feature within the REST API for cloud instances of the application.I was able to locate two feature requests asking to have this added to the products. You may find these feature requests here:
We would ask you to review these requests and vote and then watch them for future updates.
Regards,
Stephen Sifers
Thanks for the reply, Stephen!
What about User CSV file? Is there any way to retrieve that file via Powershell? It contains all the data I need and I would really like to automate as much as I can.
However, if that isn't accessible I guess I'll just have to manually export the User CSV and provide it to my script so the script can do its magic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.