Splunk Enterprise Security

How to delete users with realms via REST API in Enterprise Security Credential Management?

rturk
Builder

Hi Splunkers & Splunkettes,

So when attempting to remove a configured user via a REST API call, I don't seem to be able to specify a unique user by realm. For example, If I configure two users:

username: svc_splunk

realm: blank

and

username: svc_splunk

realm: SA-ThreatIntelligence

Issuing the following command will remove the first one:

curl -k -u admin:pass --request DELETE \
    https://localhost:8089/servicesNS/nobody/search/storage/passwords/:svc_splunk:

``However, when running it again, I am advised that the user doesn't exist (despite the fact it's present on the Credential Manager page).

From the docs (LINK) there appears to be no way to specify the realm, hence no way to delete the user.

Is there something undocumented that I'm missing?

PS. The current method of changing & deleting users once added is horrible

0 Karma

sduff_splunk
Splunk Employee
Splunk Employee
curl -k -u admin:changeme --request DELETE https://localhost:8089/servicesNS/nobody/search/storage/passwords/realm:username:

For example, the user 'simon' in realm 'work' would be

curl -k -u admin:changeme --request DELETE https://localhost:8089/servicesNS/nobody/search/storage/passwords/work:simon:
0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...