Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Remove Roles from users

eswarijk
Tera Contributor

How do I remove a role of a user from a scoped application?

I tried to perform delete operation on sys_user_has_role table.But application access for the table is restricting to perform delete

operation on the table..

I have seen many discussion for the topic on the community. But my requirement is little different.

I am doing this operation from a scoped application and not with the global scope.

Is there any other way to remove roles from users..?

6 REPLIES 6

eswarijk
Tera Contributor

Hi anjiadmin and madhukavya,



Sorry for the requirement being misinterpreted.



I need it to be done from code level not manually.Say, I need to remove role of a user by executing business rule


Hi Eswari,


First you have make the sys_user_has_role table accessible from all applications and make Can delete--> true.


123456.png


then what ever script you have return will work properly.



Regards,


Sahitya



PS -Hit Like, Helpful or Correct based on the impact of the response.