How do i set a user account expiration date when i create a new user in ServiceNow

Cornelius2
Kilo Contributor

I want to set a user expiration date for a newly created user in Servicenow

4 REPLIES 4

nayanawadhiya1
Kilo Sage

From where users are coming to service-now?

AD or manually?

if from AD is there any field like user expiration then Map that field in User Transform Map.

or if manually then use default of user expiration field.

Kalaiarasan Pus
Giga Sage

For a similar requirement, I ended up creating a custom field on sys_user table to hold the expiration date and a scheduled job that will run daily, query the user table and deactivates the user account that have expired.

Hello Kalaiarasan,

Can you provide me the code for run schedule job and check expiry date on user account? I have requirement to check the account expire and create request to extend or deactivate user in ServiceNow.

regards

Govind

Govind10
Kilo Contributor

Hello Kalaiarasan,

Can you provide me the code for run schedule job and check expiry date on user account? I have requirement to check the account expire and create request to extend or deactivate user in ServiceNow.

regards

Govind