how to provide security admin role to a user using script in servicenow

Debasis Pati
Tera Guru

We have a security admin group and from script i am trying to add a member in the group.

for this i am first creating one record in sysevent table then i am adding the user to the particular group using script still no luck.

 

@Ankur Bawiskar any suggestions?

 

Regards,

Debasis

8 REPLIES 8

Anurag Tripathi
Mega Patron

I don't think this is going to work.

Only someone with Security Admin role can give another user Security Admin Role.

 

-Anurag

Vaibhav
Giga Guru

Hello Debasis,

 

No script needed.

Even if you have the security_admin role, you need to elevate your role first to give others the role / add others to that group.

First elevate your role and then give it.

 

Mark as correct and helpful if it solved your query.

Regards,
Vaibhav

Ankur Bawiskar
Tera Patron

@Debasis Pati 

I won't recommend using script for giving security_admin role to some group/user.

Let the security_admin role user do this task.

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

the user i am using for this is a security admin role only i am trying to automate this process that is why using script