Workflow Http operation Error for SCIM API

Hi Team,

I am working on a workflow where we need to trigger a http operation patch for SAP Ariba scim api.

How it works in postman using basic auth.
I tried to replicate the same in http operation in workflow but it fails saying supported media type.

This is my curl command

curl --location --request PATCH 'https://xyz.ondemand.com/ipsproxy/service/api/v1/scim/eec804d9-a69e-46ca-b97d-09401c1e18a1/Users/esptest20' \
--header 'Content-Type: application/scim+json' \
--header 'Authorization: Basic ***************' \
--data '{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op": "replace",
      "path": "displayName",
      "value": "esptest20"
    },
    {
      "op": "replace",
      "path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
      "value": {
        "manager": {
          "value": "e004hoq"
        }
      }
    },
    {
      "op": "replace",
      "path": "urn:ietf:params:scim:schemas:extension:sap.odm:2.0:User",
      "value": {
        "companyCode": [
          {
            "displayId": "9000",
            "primary": true
          }
        ],
        "costCenter": [
          {
            "companyCodeId": "9000",
            "costCenterId": "0095005000",
            "primary": true
          }
        ]
      }
    }
  ]
}'

And here is my workflow output:

{
  "type": "ActivityTaskScheduled",
  "timestamp": "2025-06-26T08:45:28.959657221Z",
  "attributes": {
    "displayName": "HTTP Request",
    "input": {
      "authenticationType": "basic",
      "basicAuthPassword": "$.secrets.************",
      "basicAuthUserName": "************",
      "jsonRequestBody": {
        "Operations": [
          {
            "op": "replace",
            "path": "displayName",
            "value": "esptest20"
          },
          {
            "op": "replace",
            "path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
            "value": {
              "manager": {
                "value": "e004hoq"
              }
            }
          },
          {
            "op": "replace",
            "path": "urn:ietf:params:scim:schemas:extension:sap.odm:2.0:User",
            "value": {
              "companyCode": [
                {
                  "displayId": "9000",
                  "primary": true
                }
              ],
              "costCenter": [
                {
                  "companyCodeId": "9000",
                  "costCenterId": "0095005000",
                  "primary": true
                }
              ]
            }
          }
        ],
        "schemas": [
          "urn:ietf:params:scim:api:messages:2.0:PatchOp"
        ]
      },
      "method": "patch",
      "requestContentType": "json",
      "requestHeaders": {
        "Content-Type": "application/scim+json"
      },
      "url": "https://************/Users/esptest20"
    },
    "stepName": "hTTPRequest",
    "task": "sp:http",
    "technicalName": "HTTP Request"
  }
},
{
  "type": "ActivityTaskStarted",
  "timestamp": "2025-06-26T08:45:28.969063189Z",
  "attributes": {
    "attempts": 1,
    "displayName": "HTTP Request",
    "stepName": "hTTPRequest",
    "task": "sp:http",
    "technicalName": "HTTP Request"
  }
},
{
  "type": "ActivityTaskFailed",
  "timestamp": "2025-06-26T08:45:29.491684603Z",
  "attributes": {
    "displayName": "HTTP Request",
    "error": "request failed",
    "stepName": "hTTPRequest",
    "task": "sp:http",
    "technicalName": "HTTP Request"
  }
},
{
  "type": "WorkflowExecutionFailed",
  "timestamp": "2025-06-26T08:45:29.52338686Z",
  "attributes": {
    "error": "task failed: activity error (type: sp:external:http:v2, scheduledEventID: 23, startedEventID: 24, identity: ************): request failed (type: HTTP Response Returned a Client Error, retryable: false): request failed: 415 - 415  - {\"origin\":\"SAP IPS\",\"error\":{\"code\":\"Unsupported Media Type\",\"message\":\"\"}}"
  }
}

Can you check if it’s the same content-type you are using in postman?

@Deepanshu07

As per document :
Workflow action HTTP do not support
'Content-Type: application/scim+json'

The type of content to include in the request body. The options are CSV, Form, JSON, XML, and plain text.

Even though in headers I am putting application/scim+json?

In postman also i am doing same thing in headers it is there but in body it is raw json:

@Deepanshu07

In postman just try application/json in Header , and check if that works . If yes , try the same in workflow HTTP action.

no application/json does not work in postman it returns same error unsupported media type

Can I know where you are using this cURL command in workflow? means where you are adding this?

@Deepanshu07
Deepanshu , I see no other way . HTTP action strictly allow only these content types .

Once give it a try with JSON Patch ,remove header value and select it from Request Content Type section in HTTP configuration

Got it!
And if i create the operation in the source as update account is there any way to call that via workflow i saw manage account it only includes disable enable and stuff but not update.

@Deepanshu07

Can you brief the use case , I might have any approach

The use case is every time a user’s account attribute changes; we need to trigger update account to pass the updated values for the account in the target system.

FYI we are not using attribute sync because of some other env and technical issues.

We have all the account attributes of the webservice source as identity attribute as well.

Doing via workflow is tedious process, how workflow will know if there is value mismatch between Identity attribute and account attribute? What trigger you will use?

Attribute sync will do the update (sync) operation in an easy way with what you are trying to do with workflow.

Totally agree with @JackSparrow

The issue is they do not want us to update the attribute for existing users.
only when attribute changes in the authorative source.

you mean to say that sync should happen only for new accounts and not for existing accounts?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.