Grant role to System Administrator while installing application

Sidharth Jain
Tera Expert

Hello,

I have a custom application for which I have turned the "Application Administration" checkbox on. Consequently, I had to turn the "Application Administration" of a role in the application on as well so that it becomes the admin role for the application (called the app admin role from now on). While moving the application to a new instance, no user on that instance has the app admin role and no one is able to assign it either. 

This also happens with ServiceNow's own applications (like HR core, Universal Task etc.) but after installing any such ServiceNow application, the "System Administrator" user gets the app admin role automatically and I want to mimic this for my custom app as well.

Any assistance in this is much appreciated.

3 REPLIES 3

GlideFather
Tera Patron

Hi @Sidharth Jain,

 

not sure if that would work, but you might want to try to import XML. This is not a prevention to the future, rather an attempt to fix the damage already done..

 

In the source instance, locate any user who exists with the same sys ID in both environments, assuming the role

already exists in the target envronment, then check that relationship between existing user and role on the [sys_user_has_role] table:

https://yourinstance.service-now.com/sys_user_has_role_list.do

 

For example this - my custom admin role associated with a user, export as XML and import to the target instance:

Screenshot 2026-03-05 at 10.05.53.png

 

 

Eventually in the target instance, try to assign that role to a group and add people to that group. Maybe, maybe not..

 

Disclaimer: i don't know if this will work but it costs you nothing to try... if you manage to have there at least one custom app's admin then you can already manage the access accordingly...

 

Please let me know how it's going

_____
100 % GlideFather experience and 0 % generative AI

Hi @GlideFather, already tried this a while ago and unfortunately it does not work 😞

It was just an idea, @Sidharth Jain is this impacting a PDI or client's instance?

 

If the latter, you might want to create a case from Support portal to get assistance from ServiceNow but as it is custom development, it's possible they will reject that case. Try to make it general question on why a scope app admin rights are difficult/impossible to manage in new instance after deployment...

 

good luck!

_____
100 % GlideFather experience and 0 % generative AI