# ServiceNow Outbound HTTP Logs **Sync Type: Incremental** ## Overview The ServiceNow Outbound HTTP Logs input fetches data from the ServiceNow Table API. This input accesses data from the sys_outbound_http_log table, which records the HTTP requests your instance sends to other systems (for example through REST messages, SOAP messages, or Flow Designer actions). Each record describes one outbound request: the method, URL, response status, response time, and the transaction that sent it. The `log_level` field shows the level the request was logged at (`Basic`, `Elevated`, or `All`). Headers are populated at `Elevated` and `All`, and bodies only at `All`; at `Basic` both are usually empty, although ServiceNow may still record a connection error in `response_body`. A `response_status` of `-1` means the request failed before a response was received (for example, connection refused). This input only covers **outbound** requests made by your instance. ServiceNow does not store the bodies of **inbound** requests (requests made to your instance) in any table. For inbound request metadata, use the [Transaction Logs](./servicenow-transaction-log) input. ## Enable request and response body logging By default, ServiceNow logs only basic information about outbound requests and does not record bodies. To include headers and bodies, a ServiceNow administrator must set these system properties (`sys_properties.list`). Search for each property by its exact name first and edit its value if it exists; create it only if it does not. Make sure the application scope is set to **Global** when creating or editing these properties. | Property | Type | Value | Effect | |-------------------------------------------|-----------------|--------|---------------------------------------------------------------------| | `glide.outbound_http_log.override` | `true \| false` | `true` | Applies the level below to all outbound requests. | | `glide.outbound_http_log.override.level` | `string` | `all` | Logs request and response headers and bodies. Bodies are logged only at `all`. | | `glide.outbound_http.content.max_limit` | `integer` | `1000` | Number of body characters to log. `1000` is the maximum; higher values have no effect. | To log bodies for specific REST or SOAP messages only, leave the override off and set the log level to **All** on those message records instead. See [Configure outbound logging](https://www.servicenow.com/docs/bundle/utah-api-reference/page/integrate/outbound-web-services/concept/outbound-logging-configure.html). **⚠️ Limitations:** - ServiceNow truncates logged bodies at `glide.outbound_http.content.max_limit` characters, and values above `1000` have no effect. Longer bodies arrive cut off at about 1000 characters and end with `**body truncated**`. The `request_length` and `response_length` fields still show the full original size. - By default, ServiceNow logs bodies only for text content types (such as `text/*`, `application/json`, and `application/xml`). For requests or responses with any other or missing `Content-Type`, the body field contains `**Payload logging not supported for unknown content-type.**` instead of the payload. - The override applies to every outbound request from your instance, which can increase log volume and storage on your instance. **⚠️ Sensitive data:** At the `all` level, logged headers and bodies can contain credentials such as `Authorization` headers, cookies, and tokens. ServiceNow recommends using verbose logging only for limited periods. If you keep it enabled, redact these fields in your Monad pipeline (for example with a transform) before sending data to an output. ## Prerequisites Monad authenticates to ServiceNow using the OAuth 2.0 **client credentials** grant. You need: - A ServiceNow user with the `security_admin` (or `admin`) role to configure OAuth. - A dedicated service account user that the OAuth client will run as, with the roles needed to read the tables you want to ingest. - Your ServiceNow instance name (the subdomain of your instance URL — e.g. for `https://dev279154.service-now.com/`, the instance name is `dev279154`). - Monad connects to `https://.service-now.com`. Instances reachable only on another domain are not supported. ## Setup ### Create the OAuth Application User The `client_credentials` grant has no interactive user, so the token runs as a dedicated user configured on the OAuth client record. This user does **not** need a password — the OAuth client authenticates via its client ID and secret. 1. In ServiceNow, navigate to **All** → search for `Users` → select **Users** under **System Security > Users and Groups**. 2. Click **New**, fill out User ID, First name, Last name, and Email, and click **Submit**. 3. Open the user record you just created. 4. Under the **Roles** tab, click **Edit** and add the roles the ingestion tables require. Common role mappings: | Table family | Required role | |---------------------------------------|-----------------| | Change requests, incidents, problems | `itil` | | CMDB (`cmdb_ci*`, `cmdb_rel_ci`) | `cmdb_read` | | Users, groups | `user_admin` | | Audit logs (`sys_audit*`) | `admin` | Other tables, including `em_event` (Event Management), `sysevent` and `syslog_transaction`, are protected by their own read access controls. Give the user a role that can read them (check the table's access controls in ServiceNow), and confirm with the `.list` check in [Troubleshooting](#troubleshooting). 5. Save the changes. ### Configure the OAuth client Follow ServiceNow's [Configure an OAuth client credential grant](https://www.servicenow.com/docs/r/zurich/platform-security/authentication/configure-an-oauth-client-credential-grant.html) guide to create the OAuth client. The steps below mirror the ServiceNow guide, with the Monad-specific values called out. 1. Navigate to **Machine Identity Console** → **Inbound integrations** → **New integration** → **OAuth - Client credential grant**. (On instances where the Machine Identity Console is not enabled, use **System OAuth** → **Application Registry** → **New** → **Create an OAuth API endpoint for external clients**.) 2. Fill in the **Details** form: - **Name** — any label you'll recognize (e.g. `Monad`). - **Provider name**, **Comments** — optional. - **Active** — checked. - **OAuth Application User** — select the user you created in [Create the OAuth Application User](#create-the-oauth-application-user). The client credentials grant runs as this user, so the token can read only what this user can read. - Leave **Client ID** and **Client Secret** blank; ServiceNow generates them on save. 3. Configure the **Auth Scope**. Leave **Allow access only to APIs in selected scope** *unchecked*. Monad calls the ServiceNow Table API (`/api/now/table/...`), which is treated as an unscoped (platform) API. Restricting scope causes requests to fail with `access to unscoped api is not allowed`. On the older Application Registry form, this maps to setting **Scope Restriction** to **Broadly scoped**. 4. (Optional) Under **Advanced Options**, adjust **Token Format** and **Access token lifespan** (default `1800` seconds). 5. Click **Save**, then reopen the record and note the **Client ID** and **Client Secret** — you'll enter both in the Monad input. ### Enable the client credentials grant By default, ServiceNow does not accept `grant_type=client_credentials` for inbound OAuth. Enable it once per instance: 1. Navigate to **System Properties** (`sys_properties.list`) and click **New**. 2. Create a property with: - **Name**: `glide.oauth.inbound.client.credential.grant_type.enabled` - **Type**: `true | false` - **Value**: `true` 3. Save. See [ServiceNow — Create system property to enable client credentials grant type](https://www.servicenow.com/docs/r/zurich/platform-security/authentication/create-cc-sys-prop.html). The OAuth application user needs read access to the sys_outbound_http_log table. Confirm access with the `sys_outbound_http_log.list` check in [Troubleshooting](#troubleshooting). ## Configuration ### Settings | Setting | Type | Required | Default | Description | | ------- | ---- | -------- | ------- | ----------- | | `instance_name` | string | Yes | - | The subdomain of your ServiceNow URL only — e.g. for https://dev279154.service-now.com/, enter "dev279154" (not the full URL). | | `use_synthetic_data` | bool | No | `false` | Generate synthetic data for testing, instead of connecting to a real data source. Defaults to an hourly cron schedule for cron-based inputs. | | `backfill_start_time` | date | No | - | The date to start fetching data from. If not specified, no past records will be fetched. | ### Secrets | Secret | Type | Required | Description | | ------ | ---- | -------- | ----------- | | `client_id` | secret | Yes | Client ID generated from ServiceNow Instance | | `client_secret` | secret | Yes | Client Secret generated from ServiceNow Instance | ### How syncs work Each sync collects the records **created** since the previous sync, in creation order (`sys_created_on`). A record is collected once, as it was when Monad read it. Later updates to that record (for example an incident changing state, or a configuration item's attributes changing) are not collected again, and deleted records are not reported. On the first run, if **Backfill start time** is not set, only records created after the input starts are collected. Existing records, such as your current CMDB inventory, are not. To collect existing records, set a **Backfill start time** earlier than the oldest record you need. **Backfill start time** only applies to the input's first run. Changing it later has no effect; to backfill again, create a new input. Records created while a sync is running are collected by the next sync. Each request returns up to 1,000 rows. ## Troubleshooting ### Common Issues 1. **Token exchange fails with `access_denied` / `server_error`** - Full error: `failed to get access token: {"error_description":"access_denied","error":"server_error"}` - Verify the `glide.oauth.inbound.client.credential.grant_type.enabled` system property is set to `true` (see [Prerequisites → Enable the client credentials grant](#enable-the-client-credentials-grant)). 2. **Token exchange fails with `invalid_client`** - The Client ID or Client Secret in Monad doesn't match the OAuth client record. - Reopen the client record in ServiceNow, copy both values again, and re-save the input's secrets. 3. **`access to unscoped api is not allowed` (HTTP 403)** - Full error: `{"error":{"message":"user not authorized","detail":"access to unscoped api is not allowed"},"status":"failure"}`. - ServiceNow treats the Table API (`/api/now/table/...`) as an *unscoped* (platform) API. - Change **Scope Restriction** to **Broadly scoped** (legacy form) or uncheck **Allow access only to APIs in selected scope** (Machine Identity Console). 4. **`user not authorized` on a specific table (HTTP 403)** - Token exchange succeeded, but the OAuth Application User lacks the role needed to read that table. - Common role mappings: `itil` for change requests/incidents/problems, `cmdb_read` for CMDB (`cmdb_ci*`, `cmdb_rel_ci`), `user_admin` for users and groups, `admin` for audit logs (`sys_audit*`). 5. **`invalid table ` (HTTP 400)** - The table doesn't exist on your instance. Some tables ship with specific ServiceNow plugins (e.g. `em_event` requires Event Management). - Switch to an available equivalent — for event log data, `sysevent` is available on all instances. 6. **DNS lookup failure / `no such host`** - The **Instance name** is wrong. Enter only the subdomain — e.g. `dev279154`, not `https://dev279154.service-now.com/`. 7. **Connection succeeds but no records are ingested** - **Backfill start time** is later than the most recent record — clear the field or set an earlier date. - The records you expect were created before the input's first run and no **Backfill start time** was set (see [How syncs work](#how-syncs-work)). - The table is empty for the configured window. Verify by opening `
.list` in ServiceNow filtered to the same range. - Row-level ACLs on the OAuth Application User exclude the records. Test by opening the table as the same user in the ServiceNow UI. 8. **HTTP 429 / rate limiting** - ServiceNow rate limits are configured per instance under **System Definition** → **Rate Limit Rules**. - Raise the limit for the OAuth Application User or exclude it from the rule. - Each sync pages through results 1,000 rows at a time, so large tables (for example `sys_audit`) make many requests. 9. **Updated records don't appear** - This is expected: the input collects each record once, when it is created. - Later changes to a record, such as a state change, are not collected again (see [How syncs work](#how-syncs-work)). ### Verifying the OAuth setup with `curl` Once the settings above are correct, this command should return an `access_token`: ```bash curl -s -X POST "https://.service-now.com/oauth_token.do" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials&client_id=&client_secret=" ``` If this returns an `access_token`, the OAuth side is done and any remaining errors are table- or role-scoped. ## Related Articles - [ServiceNow Table API](https://www.servicenow.com/docs/bundle/zurich-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html) - [ServiceNow OAuth](https://www.servicenow.com/docs/bundle/zurich-api-reference/page/integrate/inbound-rest/task/t_EnableOAuthWithREST.html) - [Outbound web service logging properties](https://docs.servicenow.com/bundle/utah-api-reference/page/integrate/outbound-web-services/reference/outbound-logging-properties.html) ## Sample Record ```json { "app_scope": "global", "hostname": "httpbin.org", "log_level": "All", "method": "POST", "mid_server": "", "path": "/post", "protocol": "HTTP/1.1", "request_body": "{\"test\":\"monad\"}", "request_headers": "{Content-Length=16, Content-Type=application/json, X-SNC-INTEGRATION-SOURCE=5f2a9c1e7b3d4e6f8a0b1c2d3e4f5a6b, User-Agent=ServiceNow/1.0, Host=httpbin.org}", "request_length": "16", "request_query": "", "response_body": "{\n \"args\": {},\n \"data\": \"{\\\"test\\\":\\\"monad\\\"}\",\n \"json\": {\n \"test\": \"monad\"\n },\n \"method\": \"POST\",\n \"origin\": \"203.0.113.10\",\n \"url\": \"https://httpbin.org/post\"\n}\n", "response_headers": "{access-control-allow-origin=*, content-length=422, content-type=application/json, x-content-type-options=nosniff, date=Wed, 18 Nov 2026 00:51:09 GMT}", "response_length": "422", "response_status": "200", "response_time": "563", "rrt": "", "rst": "", "scheme": "https", "sequence": "2308", "session_id": "A3AEF4768360931058CBE530CEAAD33E", "source_table": "scoped_script_evaluation", "sys_created_by": "admin", "sys_created_on": "2026-11-18 00:51:09", "sys_id": "9bc0193a83e0931058cbe530ceaad364", "sys_mod_count": "0", "sys_tags": "", "sys_updated_by": "admin", "sys_updated_on": "2026-11-18 00:51:09", "system_id": "app000001.example.service-now.com:test-xyz001", "transaction_id": "0fc055768360931058cbe530ceaad380", "transaction_name": "#3712 /sys.scripts.do", "url": "https://httpbin.org/post", "user_name": "admin" } ``` ## Sync frequency By default this input polls approximately every 10 seconds, with each sync beginning after the previous one completes. A cron schedule configured on the pipeline overrides this cadence. See [Input Sync Frequency](/docs/guides/sync-frequency) for details.