Kpjangid
Enthusiast
Enthusiast

How to get vCenter Single Sign-On users last login report

Hello Community,

There're a lot of local single sign-on user accounts exist in our vCenter server and most of them are not active. I want to generate a report of usernames and their last login date/time on the vCenter server. Based on that report, I will contact the respective users and remove their accounts if they're no more needed.

Is there any command or script available using which I can get the last login time of each local sso user?

vCenter version: 6.5

Thank you so much.

Thank you!
Vikramaditya J
0 Kudos
3 Replies
Kpjangid
Enthusiast
Enthusiast

Hello Community,

I have got one option to get local sso users and their last login time on vCenter web client under following logs: 

/var/log/vmware/sso/websso.log

And

/var/log/vmware/sso/websso-x.log (replace "x" with 1, 2, 3 and so on)

Simply check for particular user details in these logs file:

# cat /var/log/vmware/sso/websso.log | grep username

In the output, just go to the last entry in latest log file. Last entry will start with user's login timestamp.

Thank you!
Vikramaditya J
Tags (1)
0 Kudos
scott28tt
VMware Employee
VMware Employee

@Kpjangid 

Moderator: Thread moved to vCenter Server Discussions

0 Kudos
NathanosBlightc
Commander
Commander

Regardless of checking log file directly via VCSA shell access, you can do it via PowerCLI too. For example check the following link:

https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-user-logon-logoff-history/td-p/498...

 

Please mark my comment as the Correct Answer if this solution resolved your problem
0 Kudos