My Oracle Support Banner

IDCS REST API Returns "The request failed: HTTP 415 Unsupported Media Type" (Doc ID 2778519.1)

Last updated on DECEMBER 03, 2021

Applies to:

Identity Cloud Service (IDCS) - Version N/A to N/A
Information in this document applies to any platform.


Executing an Identity Cloud Service (IDCS) REST API returns the following error:


"The request failed: HTTP 415 Unsupported Media Type"


See an example in code below using the "Custom Claims" REST API:


curl -i -X POST https://idcs-<your idcs domain>/admin/v1/CustomClaims -H 'Authorization: Bearer token' -H 'Cache-Control: no-cache' -H 'Accept:application/json' -d @custom9.json

HTTP/1.1 415 Unsupported Media Type
Cache-Control: no-cache, no-store, must-revalidate
Content-Length: 138
Content-Type: application/json
Date: Thu, 20 May 2021 23:46:44 GMT
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Pragma: no-cache
Server: Oracle Identity Cloud Service
Via: 1.1 net-idcs-config
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Oracle-Dms-Ecid: 0000NaCB9jB5qYO5IjO5yf1WdHgh000Jb5
X-Oracle-Dms-Rid: 0
X-Xss-Protection: 1; mode=block

{"schemas":["urn:ietf:params:scim:api:messages:2.0:Error"],"detail":"The request failed: HTTP 415 Unsupported Media Type.","status":"415"}

$ cat custom9.json
"schemas": [
"name": "usernametest",
"value": "$user.userName",
"expression": true,
"mode": "always",
"tokenType": "BOTH",
"allScopes": true


Additional information on using IDCS REST API to add custom claims can be found at:





To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.