Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Last login field is not updating

sainath3
Giga Guru

Hi Team,

My requirement is to De-Activating the users who are not logged in since 90 days.

using last login field am fetching the users but I observed some of the users are login in every day but last login date field is not updated.

For some of the users last login date is showing accurately.

I have checked the Script Action "Last login time" code & event logs with name as login and Parm1 as that user id

only few user details are showing not all the users.

Note:

All users are using same URL for login.

My last login date is also not updated, Since one month am regularly logging in.

 

 

Thanks 

Bachu Sainath

8 REPLIES 8

Community Alums
Not applicable

Are you using LDAP integration ? 

Please look at the similar issue here

https://community.servicenow.com/community?id=community_question&sys_id=71100e0edbdda3404abd5583ca961963

Thanks Sudeep for Quick response.

 

I have checked that link, we are not using any LADP integration to populate last login field.

through regular link only we all are logging in.

 

sainath3
Giga Guru

Hi Team,

I found the route cause is which user having the role of "snc_read_only" for their last login field is not getting updated.

  • Could you please tell me where that condition can be written ?
  • From where Event "login" is getting triggered ?

 

Note:

Script Action("Last login time") is executing when the Event(Login) is triggered.

I reproduced this issue for one of the itil user, and gave him snc_read_only role, but still the details got updated.

Can you try to update this in the background script by copying script of Script Action("Last login time, if last login time is being updated for that user or not?

Best Regards
Aman Kumar