Unable to add user to app via Merge passthrough request

I can add a user to an app through the API via Postman and the Oktakit ruby gem. When performing what should be the same request through Merge, it returns a 400. Other Merge passthrough requests are working, it’s just the POST to {{url}}/api/v1/apps/{{appId}}/users that’s not working.


payload = {
  method: "POST",
  headers: {
    Accept: "application/json",
    ContentType: "application/json"
  path: "/api/v1/apps/#{@okta_app_id}/users",
  data: {
    id: @okta_user_id || "",
    scope: "USER"
response = api_instance.passthrough_create(access_token, payload)


 :errorSummary=>"Bad request.  Accept and/or Content-Type headers likely do not match supported values.",

It’s not the suggested issue of Accept and/or Content-Type. Here’s the request headers in the MergeHRISClient object:

   :"Accept-Encoding"=>"gzip, deflate, br",

Calling .to_json on the body has the same effect. I’ve compared working Postman requests to the Merge <=> Okta request and I don’t see any real difference.

I’ve also tried other content types but I haven’t been able to get this call to work if it’s coming from Merge. I’ve tried the Merge API Tester and I’m getting the same error.

Found the error. The header needs to be “Content-Type” and not “ContentType” :person_facepalming:

1 Like

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