Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving users last login date without SQL on Cloud

marta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 19, 2019

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.

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 20, 2019

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

marta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2019

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.

Like Aymen Ben Tanfous likes this

Suggest an answer

Log in or Sign up to answer