Use this section to diagnose and resolve common issues when working with the Anaplan Audit API.
Audit API issues typically stem from authentication token lifespans, missing administrative roles, invalid timestamp units or interval parameters, 30-day retention boundaries, or SIEM format negotiation discrepancies between JSON and Common Event Format (CEF).
Before contacting Anaplan Support, review the relevant HTTP status code, response message, and request parameters to isolate the root cause and determine the appropriate resolution.
Error response format
When a request fails, the Audit API returns standard HTTP status codes along with a diagnostic JSON response body indicating the failure state and description:
{
"status": "FAILURE",
"statusMessage": "User does not have Tenant Auditor permissions"
}
For certain boundary conditions, such as when the limit exceeds the maximum threshold, the API returns an HTTP 204 No Content status with a descriptive message rather than a standard 4xx error.
Error codes
| HTTP status | Description | Common cause | Recommended action |
200 OK | Request completed successfully. | The query executed and events were returned. | Process the JSON payload or CEF text stream. |
204 No Content | Request succeeded or handled, but returns no body. | Requested limit exceeds 10,000, or no events match the lookback criteria. | Check if limit > 10000. If querying events, verify the time window falls within the 30-day retention period. |
400 Bad Request | The request is invalid or malformed. | Timestamps passed in seconds instead of milliseconds, negative intervals, inverted date ranges, or invalid type. | Validate timestamp formatting (Epoch milliseconds UTC), ensure dateFrom < dateTo, and confirm type is one of all, byok, user_activity. |
401 Unauthorized | Authentication failed or token is missing/expired. | Auth token exceeded 30-minute TTL, invalid header syntax, or token was revoked via logout. | Generate a new token via /token/authenticate or refresh an active session via /token/refresh. Verify Authorization: AnaplanAuthToken {token} syntax. |
403 Forbidden | Access denied. | Caller lacks the Tenant Auditor role, or the Audit feature is inactive on the tenant. | Confirm the user account has the Tenant Auditor role assigned in the Anaplan Administration console. |
404 Not Found | Resource or endpoint path doesn't exist. | Incorrect base URL, typo in path template, or invalid endpoint. | Ensure the base host is https://audit.anaplan.com/audit/api/1 and endpoints are /events or /events/search. |
406 Not Acceptable | Requested format isn't supported. | The Accept header specifies an unsupported media type (for example, application/xml). | Set Accept: application/json for JSON output or Accept: text/plain for CEF logs. |
500 Internal Server Error | Server encountered an unexpected error. | An internal database timeout or service failure occurred. | Retry the request using exponential backoff. If the issue persists, contact Anaplan Support. |
503 Service Unavailable | Service temporarily unavailable. | Infrastructure maintenance or cluster failover. | Wait several minutes and retry the request. |
Audit HTTP error messaging and parameter validation
Use this reference table to map specific error symptoms and messages to their recommended resolutions:
| HTTP status | API message/error context | Recommended action |
204 | Requested limit is more than the Specified limit | Reduce the limit query parameter to 10000 or fewer (typical extractions use 100 to 1,000). |
204 | Empty response body on event query | Broaden the lookback window or confirm whether audit activity occurred in the tenant during the specified timeframe. |
400 | Invalid timestamp unit / Date parsing error | Ensure all dateFrom, dateTo, from, and to timestamps are 13-digit Epoch milliseconds (for example, 1520433163000), not 10-digit seconds. |
400 | 'from' must be an earlier date than 'to' | Ensure the starting boundary dateFrom or from is chronologically earlier than dateTo or to. |
400 | Invalid value for parameter 'type' | Ensure type is strictly one of: all, byok, or user_activity. |
400 | Invalid interval specified | Set interval or intervalInHours to a positive integer (for example, 24 for the last 24 hours). Values are rejected. |
400 | Error parsing request body as JSON | Ensure the POST /events/search request body is valid JSON with unquoted numeric values for millisecond timestamps. |
401 | Token expired or invalid | Re-authenticate against https://auth.anaplan.com/token/authenticate to acquire a fresh JWT token. |
403 | User does not have Tenant Auditor permissions | A Tenant Administrator must assign the Tenant Auditor role to the API user in Anaplan Administration. |
403 | Feature 'Audit' is not enabled for tenant | Contact your Anaplan account representative to ensure Audit Service entitlements are active on your subscription. |
404 | Endpoint not found | Verify URL spelling and ensure the API version prefix (/audit/api/1) is present. |
Common troubleshooting scenarios
Authentication fails (HTTP 401)
Authentication failures occur when the authorization token is missing, expired, revoked, or improperly formatted.
- Check token lifespan: Anaplan authentication tokens have a strict 30-minute lifespan (1,800,000 ms). For ongoing polling scripts, refresh the token prior to expiration using
POST https://auth.anaplan.com/token/refresh. - Check header format: The
Authorizationheader must include the literal prefixAnaplanAuthTokenfollowed by a single space and the token string:Authorization: AnaplanAuthToken eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9... - Verify token validity: Test the token directly using the validate endpoint:
curl -X GET https://auth.anaplan.com/token/validate \
-H "Authorization: AnaplanAuthToken {anaplan_auth_token}"
Access denied (HTTP 403)
An HTTP 403 Forbidden indicates that the token is valid, but the user identity lacks authorization to access the tenant's audit logs.
- Check tenant auditor role: The calling account must be assigned the Tenant Auditor role. Having Workspace Administrator, Tenant Security Administrator, or Page Builder privileges doesn't automatically grant audit log access.
- Confirm subscription enablement: Ensure the Audit API is enabled on your tenant contract.
- Cross-tenant access restrictions: Audit logs are tenant-isolated. An administrator in Tenant A can't query logs for Tenant B using Tenant A's token.
Request returns HTTP 204 instead of events
An HTTP 204 No Content can indicate either an intentional empty result set or a query boundary violation.
- Check the
limitparameter: Iflimitis set to greater than 10,000, the API returnsHTTP 204with the error message:Requested limit is more than the Specified limit.Always constrainlimit <= 10000. - Check the 30-day retention window: Anaplan retains audit events for a rolling 30-day window. Any query with timestamps older than 30 days will return no results.
- Verify current stream: Test with a small relative lookback (for example,
intervalInHours=1orintervalInHours=24) without event type filtering to verify whether events are actively committing.
Timestamp and interval query errors (HTTP 400)
Timestamps must adhere strictly to Epoch millisecond standards.
- Milliseconds and seconds: Standard Unix timestamps in seconds (10 digits, for example,
1520433163) will cause queries to fail or return no records. Always convert to 13-digit millisecond timestamps (for example,1520433163000). - Inverted boundaries: Ensure
dateFromis less thandateTo. - Interval boundaries: The
intervalInHoursparameter must be a positive integer. Fractional or negative values returnHTTP 400.
Receiving JSON when CEF output was expected
If your SIEM collector expects raw CEF text lines but receives a JSON response body:
- Inspect the
Acceptheader: The Audit API defaults toapplication/json. To receive Common Event Format text, explicitly set:Accept: text/plain - Correct syntax for
POST /events/search: When searching via POST, ensure the request headers specifyContent-Type: application/jsonfor the request body andAccept: text/plainfor the response:
curl -X POST "https://audit.anaplan.com/audit/api/1/events/search?type=all" \
-H "Authorization: AnaplanAuthToken {token}" \
-H "Content-Type: application/json" \
-H "Accept: text/plain" \
-d '{"interval": 24}'
CEF event parsing and extension field issues
If your SIEM index shows unparsed CEF headers or missing metadata:
- Header format: Anaplan CEF records follow this schema:
CEF:0|Anaplan, Inc.|Host|Version|SignatureID|Name|Severity|Extension - Time fields:
eventDate: The Epoch millisecond timestamp when the action occurred.createdDate: The Epoch millisecond timestamp when the log was stored in the audit datastore.
- Data integrity: Verify the
checksumextension value if non-repudiation and cryptographic validation are required by your compliance framework.
Missing events or gaps during automated polling
Automated polling architectures can drop events if they rely solely on sliding relative lookback windows.
- Avoid non-overlapping relative windows: Querying
intervalInHours=1every hour can introduce gaps due to network latency, ingestion delays, or clock skew. - Implement stateful high-water mark tracking:
- Store the highest
eventDateor maximumidprocessed from the previous batch. - Use that timestamp as
dateFrom(orfrom) in the subsequent poll. - De-duplicate any overlapping records using the unique 64-bit numerical event
id.
- Store the highest
- Iterate through
meta.paging: Always checknextUrland continue paginating untiloffSet + currentPageSize >= totalSize:
{
"meta": {
"paging": {
"currentPageSize": 50,
"totalSize": 263,
"offSet": 0,
"nextOffset": 50,
"nextUrl": "https://audit.anaplan.com/audit/api/1/events?limit=50&offset=50"
}
}
}
Differences between GET /events and POST /events/search
GET /events:Ideal for periodic incremental polling using query parameters (intervalInHours,dateFrom,dateTo,limit,offset).POST /events/search:Ideal when constructing programmatic queries with complex body parameters (from,to,interval) without exposing long query strings in request URLs.- If
tois omitted in POST search, events fromfromup to the current moment are returned. - If
fromis omitted, events from the start of the 30-day retention window up totoare returned.
- If