Enable and disable outbound HTTP debug logging using a background scriptSummary<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } This article explains how to enable and disable debug logging for outbound HTTP requests on a ServiceNow instance by running a background script that sets the relevant system properties. Important: These properties significantly increase log volume and may capture sensitive data — including credentials, tokens, and personally identifiable information (PII) — in plain text within system logs. Enable them only during an active troubleshooting session and disable them immediately after capturing the required data. Where possible, use the more targeted per-method log level option (available via the Set log level related link on the relevant REST Message or SOAP Message record) before enabling system-wide properties. Avoid running these scripts on production instances unless no other option is available. Facts<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } * Applies to any Outbound REST or SOAP integration using Integration Hub, REST Message, or SOAP Message records* Applies to all currently supported ServiceNow releases* Requires the Admin role to modify system properties* Properties take effect immediately — no restart required* Logging output is written to System Logs > Outbound HTTP Requests Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } All supported releases Instructions<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } To enable debug logging 1. Navigate to System Definition > Scripts - Background. 2. Paste the following script into the Run Script field and select Run script. //***** Begin Script***** var grInsert = new GlideRecord('sys_properties'); grInsert.initialize(); //check if the record exists var grCheck = new GlideRecord('sys_properties'); grCheck.addQuery('name', 'glide.rest.outbound.debug'); grCheck.query(); if (grCheck.next()) { gs.info("Property Value Exists: " + grCheck.name + " and VALUE is " + grCheck.value); } else { grInsert.name = 'glide.rest.outbound.debug'; grInsert.type = 'boolean'; grInsert.value = 'false'; grInsert.ignore_cache = 'true'; grInsert.insert(); gs.info("Property Value Inserted " + grInsert.name + " and VALUE is " + grInsert.value); } var names = 'glide.outbound_http_log.override.level,glide.outbound_http.content.max_limit,glide.outbound_http_log.override,glide.rest.outbound.debug'; var gr =new GlideRecord('sys_properties'); gr.addQuery('name', 'IN', names); gr.query(); while (gr.next()) { if(gr.name == 'glide.outbound_http_log.override' && gr.value != 'true' ) { gr.setValue('value', 'true'); } if(gr.name == 'glide.outbound_http_log.override.level' && gr.value != 'all' ) { gr.setValue('value', 'all'); } if(gr.name == 'glide.outbound_http.content.max_limit' && gr.value != '1000' ) { gr.setValue('value', '1000'); } if(gr.name == 'glide.outbound_http_log.override' && gr.value != 'true' ) { gr.setValue('value', 'true'); } if(gr.name == 'glide.rest.outbound.debug' && gr.value != 'true' ) { gr.setValue('value', 'true'); } gr.update(); } //***** End Script***** 3. Verify that logging is active by navigating to System Logs > Outbound HTTP Requests and confirming that new entries appear after triggering an outbound integration. To disable debug logging: 1. Navigate to System Definition > Scripts - Background. 2. Paste the following script into the Run Script field and select Run script. ***** Begin Script***** var names = 'glide.outbound_http_log.override.level,glide.outbound_http.content.max_limit,glide.outbound_http_log.override,glide.rest.outbound.debug'; var gr =new GlideRecord('sys_properties'); gr.addQuery('name', 'IN', names); gr.query(); while (gr.next()) { if(gr.name == 'glide.outbound_http_log.override' && gr.value == 'true' ) { gr.setValue('value', 'false'); } if(gr.name == 'glide.outbound_http_log.override.level' && gr.value == 'all' ) { gr.setValue('value', 'basic'); } if(gr.name == 'glide.outbound_http.content.max_limit' && gr.value == '1000' ) { gr.setValue('value', '100'); } if(gr.name == 'glide.outbound_http_log.override' && gr.value == 'true' ) { gr.setValue('value', 'false'); } if(gr.name == 'glide.rest.outbound.debug' && gr.value == 'true' ) { gr.setValue('value', 'false'); } gr.update(); } ***** End Script***** 3. Confirm that debug logging is disabled by navigating to System Logs > Outbound HTTP Requests and verifying that new entries no longer show full request and response body content. Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Using Scripts - Background Prevent verbose HTTP request logging Outbound web service logging properties