- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2021 04:07 PM
Hi All,
I have an OAuth Provider set up in Application Registries.
Does anyone know how to go about changing the Client ID and Client Secret fields using a script?
I have tried accessing the table through the glide record API but when looking for the Application Registries table name I couldn't find anything.
THANKS!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2021 05:42 PM
Hi,
Can you elaborate a bit more on what you mean by: I couldn't find anything?
Running this simple background script both client id and client secret at a minimum...what did you try?
var gr = new GlideRecord('oauth_entity');
gr.get('sys_id_of_record');
//gs.info("Record client ID is: " + gr.client_id);
//var Encrypter = new GlideEncrypter();
//var encrypted = gr.client_secret;
//var decrypted = Encrypter.decrypt(encrypted);
//gs.info("Record encrypted client secret is: " + encrypted);
//gs.info("Record decrypted client secret is: " + decrypted);
gr.client_id = 'test123';
gr.client_secret.setDisplayValue('test456');
gr.update();
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2021 05:42 PM
Hi,
Can you elaborate a bit more on what you mean by: I couldn't find anything?
Running this simple background script both client id and client secret at a minimum...what did you try?
var gr = new GlideRecord('oauth_entity');
gr.get('sys_id_of_record');
//gs.info("Record client ID is: " + gr.client_id);
//var Encrypter = new GlideEncrypter();
//var encrypted = gr.client_secret;
//var decrypted = Encrypter.decrypt(encrypted);
//gs.info("Record encrypted client secret is: " + encrypted);
//gs.info("Record decrypted client secret is: " + decrypted);
gr.client_id = 'test123';
gr.client_secret.setDisplayValue('test456');
gr.update();
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2021 06:01 PM
Hi Allen,
I can't believe I missed it. Thank you for catching my mistake!