- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
09-30-2025 04:04 AM
Error as follows:
error.message == "Http Error, statusCode: 400, details: {"host":">tenant<.my.idaptive.app","port":"","path":"/oauth2/token","method":"post","statusCode":400,"response":"{\"error\":\"invalid_request\",\"error_description\":\"bad url\"}","contentType":"application/json; charset=utf-8","elapsed":122,"startTime":1759228101254}"
Documentation here Use the client credentials flow | CyberArk Docs seems to suggest I need to add Application ID, is this correct?
09-30-2025 04:10 AM
Hi @Ian Broughton
The error suggest that it’s missing the mandatory /{app_id} at the end of the /oauth2/token path.
tenant.my.idaptive.app/oauth2/introspect/appID
OR
tenant.id.cyberark.cloud/oauth2/introspect/appID
)
https://docs.cyberark.com/identity/latest/en/content/coreservices/authenticate/oauth2-client.htm
Hope it helps !
09-30-2025 07:42 AM
'https://$(audit_integration_endpoint)/api/audits/stream/$(some path)'
What is "some path"?
09-30-2025 07:43 AM
Thanks for your help by the way.
09-30-2025 09:29 PM
Hello @Ian Broughton
Please refer to below article which might help you!
09-30-2025 09:29 PM
Hello @Ian Broughton
Please refer to below article which might help you!
09-30-2025 10:55 PM
Hi @Ian Broughton
It’s just a placeholder in the documentation.It represents specific API resource path you want to call.
Hope it helps !
10-01-2025 12:08 AM
Hi Ruhi, this is an API integration, nothing to do with SSO I'm afraid.
10-01-2025 12:13 AM
Hi Malhar,
Yeah, we've tried it with specific path and it does not work. It doesn't help that CyberArk's documentation is pretty awful and all over the place. See:
Identity Audit - How To configure CyberArk Identity SIEM Integration with Microsoft Sentinel
SIEM integration API | CyberArk Docs
Custom OAuth2 Client | CyberArk Docs
Integrate Audit with third-party SIEM applications | CyberArk Docs
Be nice if there was one article with clear steps on how to get this to work, rather than a myriad number of conflicting docs.
I can see an OAuth request and the relevant access token but I'm completely perplexed as to what is missing.
10-01-2025 12:23 AM
Hi @Ian Broughton
Have you tried this ?
grant_type=client_credentials&client_id=<clientid>&client_secret=<secret>
https://tenant.my.idaptive.app/oauth2/token
10-01-2025 12:28 AM
Yes, added `grant_type=client_credentials&client_id=<clientid>&client_secret=<secret>&scope=isp.audit.events:read` in the Collect POST body
Collect URL is 'https://<tenant>.my.idaptive.app/oauth2/token/<clientid>'
Collect headers are:
Accept - ''application/json'
Content-Type - 'application/x-www-form-urlencoded'
10-15-2025 10:56 AM
Hi @Ian Broughton
Just out of curiosity have you tried this https://<tenant>.my.idaptive.app/oauth2/token
I think OAuth token endpoint is not accepting the client ID in the path.
10-16-2025 02:07 AM
I've got this working now with some considerable trial and error. It's a truly horrible API though, and the documentation is awful.
10-16-2025 04:30 AM
Hi @Ian Broughton
Would you be able to share how you were able to fix this issue?
I am curious to know for future reference.
10-21-2025 01:57 AM
{
"type": "collection",
"ttl": "4h",
"ignoreGroupJobsLimit": false,
"removeFields": [],
"resumeOnBoot": false,
"schedule": {
"cronSchedule": "*/5 * * * *",
"maxConcurrentRuns": 1,
"skippable": true,
"run": {
"rescheduleDroppedTasks": true,
"maxTaskReschedule": 1,
"logLevel": "info",
"jobTimeout": "60m",
"mode": "run",
"timeRangeType": "relative",
"timeWarning": {},
"expression": "true",
"minTaskSize": "1MB",
"maxTaskSize": "10MB",
"stateTracking": {
"stateUpdateExpression": "__timestampExtracted !== false && {latestTime: (state.latestTime || 0) > _time ? state.latestTime : _time}",
"stateMergeExpression": "(prevState.latestTime || 0) > newState.latestTime ? prevState : newState",
"enabled": false
},
"earliest": "-5m",
"latest": "now"
},
"enabled": true
},
"streamtags": [],
"workerAffinity": false,
"collector": {
"conf": {
"discovery": {
"discoverType": "http",
"discoverMethod": "post_with_body",
"pagination": {
"type": "response_body",
"maxPages": 100,
"attribute": [
"cursorRef"
],
"lastPageExpr": "!__e || !__e.cursorRef"
},
"enableStrictDiscoverParsing": false,
"enableDiscoverCode": false,
"discoverUrl": "'https://<tenant>/api/audits/stream/createQuery'",
"discoverBody": "`{\"query\": {\"pageSize\": 500,\"selectedFields\": [\"tenant_id\",\"custom_data\",\"arrival_timestamp\",\"checksum\",\"application_code\",\"audit_code\",\"timestamp\",\"user_id\",\"session_id\",\"source\",\"action_type\",\"audit_type\",\"component\",\"target\",\"command\",\"message\",\"username\",\"action\",\"uuid\",\"service_name\",\"cloud_roles\",\"cloud_workspaces\",\"cloud_workspaces_and_roles\",\"cloud_assets\",\"cloud_identities\",\"vaulted_accounts\",\"cloud_provider\",\"account_name\",\"target_platform\",\"safe\",\"target_account\",\"identity_type\",\"access_method\",\"account_id\",\"correlation_id\"],\"filterModel\": {\"date\": {\"dateFrom\": \"${C.Time.strftime(state.latestTime || earliest || 0, '%Y-%m-%d %H:%M:%S')}\",\"dateTo\": \"${C.Time.strftime(latest || 0, '%Y-%m-%d %H:%M:%S')}\"}},\"sortModel\": [{\"field_name\": \"string\",\"direction\": \"asc\"}]}}`",
"discoverRequestHeaders": [
{
"name": "x-api-key",
"value": "'REDACTED'"
}
]
},
"collectMethod": "post_with_body",
"pagination": {
"type": "response_body",
"maxPages": 100,
"attribute": [
"cursorRef"
],
"lastPageExpr": "!_e || !_e.cursorRef || _e.cursorRef === ''"
},
"authentication": "oauth",
"timeout": 0,
"useRoundRobinDns": false,
"disableTimeFilter": false,
"decodeUrl": false,
"rejectUnauthorized": true,
"captureHeaders": true,
"safeHeaders": [],
"retryRules": {
"type": "backoff",
"interval": 1000,
"limit": 5,
"multiplier": 2,
"maxIntervalMs": 20000,
"codes": [
429,
503
],
"enableHeader": true,
"retryConnectTimeout": false,
"retryConnectReset": false,
"retryHeaderName": "retry-after"
},
"__scheduling": {
"stateTracking": {}
},
"loginUrl":"loginUrl": "'https://<tenant>my.idaptive.app/oauth2/token/<value>'",
"authHeaderKey": "Authorization",
"authHeaderExpr": "`Bearer ${token}`",
"clientSecretParamName": "grant_type",
"loginBody": "`grant_type=client_credentials&client_id=username@cybarlocal&client_secret=REDACTED&scope=isp.audit.events:read`",
"clientSecretParamValue": "client_credentials",
"collectUrl":"`https://<tenant>/api/audits/stream/results`",
"authRequestHeaders": [
{
"name": "Authorization",
"value": "\"Basic \" + C.Encode.base64(\"username@cybarlocal:REDACTED")"
}
],
"authRequestParams": [
{
"name": "scope",
"value": "'isp.audit.events:read'"
}
],
"tokenRespAttribute": "access_token",
"collectRequestParams": [],
"collectRequestHeaders": [
{
"name": "x-api-key",
"value": "'REDACTED'"
}
],
"username": "REDACTED",
"password": "REDACTED",
"collectBody": "`{\\\"cursorRef\\\": \\\"${cursorRef}\\\"}`"
},
"destructive": false,
"encoding": "utf8",
"type": "rest"
},
"input": {
"type": "collection",
"staleChannelFlushMs": 10000,
"sendToRoutes": true,
"preprocess": {
"disabled": true
},
"throttleRatePerSec": "0",
"metadata": [
{
"name": "__datasource",
"value": "'cyberarkidentity'"
}
],
"breakerRulesets": [
"CyberArk"
]
},
"description": "CyberArk Identity REST API",
"savedState": {},
"id": "CyberArk_Identity"
}
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

