Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Verify if scope exists in ServiceNow instance

Ankur Bawiskar
Tera Patron

If you need to verify whether a scope belongs to ServiceNow, you can use the following script.

Example:

var scopeObj = new GlideScopeAPI();

var currScope = 'sn_grc_profiles';

gs.info(scopeObj.isServiceNowScope(currScope));

 

AnkurBawiskar_0-1730728593062.png

 

 

Note: This function does not check global scope or custom created scoped applications and it returns as false. And this is an undocumented API.

 

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader
0 REPLIES 0