Use the following cURL command to create an OCI service user:
curl -X POST <DOMAIN_URL>/admin/v1/Users \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/scim+json" \
-d '{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:oracle:idcs:extension:user:User"],
"userName": "<USERNAME>",
"displayName": "<DISPLAY_NAME>",
"urn:ietf:params:scim:schemas:oracle:idcs:extension:user:User": { "serviceUser": true }
}'Replace the following fields in the above CURL:
Parameter | Value |
|---|---|
<DOMAIN_URL> | The domain URL of your Oracle Cloud |
<ACCESS_TOKEN> | The access token you got from this step: Getting an OCI access token (REST) |
<USERNAME> | Give any username |
<DISPLAY_NAME> | Give any display name |
Copy ID from the response, that's - <USER_ID> (a short ID, not an OCID), which is required in the next step.