How to give temporary admin access for an user profile for 2 weeks?

kkswamy
Tera Expert

Hi,

Is there any way to give the temporary admin access for an ITIL user profile for 2 weeks time period, after two weeks it should automatically reset to the ITIL role.

Note: we are using AD integration for user profile creation or update or delete. Is there any option in Active directory to do this.

Any help would be appreciated.

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Swamy,



Nothing from AD you can do.


Approach:


1) give admin role to the user


2) have schedule job that runs daily and checks in sys_user_has_role table which user was given admin role and has crossed 15 days. if crosses then delete the record which will cause the user to have only itil role which was already there



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Can you please provide an example of what this will look like? Im trying to design this in my pdi and i'm not sure if i'm doing it correctly. What code are you using for this scheduled job? 

I made a catalog item to do this without having to run scheduled job using flow designer. Look at my screenshot below!

Jaspal Singh
Mega Patron
Mega Patron

Hi Kotaiah,



Not sure about AD but in ServiceNow you can have Scheduled job written for getting it worked.