GlideEncrypter is not allowed in scoped applications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2016 02:58 PM
GlideEncrypter is not allowed in scoped applications.How can i access the function in scoped application?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2016 06:21 PM
Short answer: You can't.
Why are you developing in an application scope?
If you don't intend to put your app on the store or deploy it at your customers, you might want to reconsider your design choice.
Otherwise, you need to find an alternative API call.
Check out https://developer.servicenow.com/app.do#!/api_doc?v=helsinki&type=server&scoped=true
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 07:13 AM
This answer is so confusing. What do you mean "Why are you developing in an application scope?". I assume this is an outdated answer but just seems odd. There are many use cases where people need to encrypt and decrypt in a scoped app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2020 03:18 PM
It's ridiculous that you can't encrypt or decrypt anything in scoped app scripts.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2020 03:25 PM
You can use it in scoped apps like below
gr.password.getDecryptedValue() can be used in scope apps for scoped decrypt
gr.password.setDisplayValue('un-encrypted string goes here'); can be used for scoped encrypt
var encrypter = new GlideEncrypter();
var encrypted = encrypter.encrypt('Super Secret Phrase');
gs.info('encrypted: ' + encrypted);
var decrypted = encrypter.decrypt(encrypted);
gs.info('decrypted: ' + decrypted);
gr.password.getDecryptedValue();
gr.password.setDisplayValue('un-encrypted string goes here');