Web Service Connector not fetching results

Hi Alex
Thank you for sharing the details.
Can you please try to create the user with the same payload you have configured via postman or some web services supported tool and then see if that operation works.
Currently the response you are receiving is 400 which could be various different reasons.

Please keep us updated with the response you receive.

Thank you
Regards
Vikas

Hi Yan,

I’m able to execute the POST request in Postman using curl and create the worker. In Sailpoint I did the same using curl and the request was successful, however when I validated in the target source the account was not created. This is what i’m using. Also I noticed that some attributes were not populated in the request so I had to add multiple Update Account Operation. Any ideas what could be going on. The use case is very simple, the idea is to create an a worker based on BusinessUnitName which is set as an entitlement.

curl --location ‘hcmRestApi/resources/11.13.18.05/workers’
–header ‘Content-Type: application/json’
–header ‘-H: REST-Framework-Version: 4’
–header ‘-H: Effective-Of:RangeStartDate=2024-03-27’
–header ‘-X: POST’
–header ‘Authorization: Basic
=’
–data-raw ‘{
“names”: [{
“LastName”: “$plan.LastName$”
“FirstName”: “$plan.FirstName$”,
“LegislationCode”: “$plan.LegislationCode$”
}],
“emails”: [{
“EmailType”: “$plan.EmailType$”,
“EmailAddress”: “$plan.EmailAddress$”
}],
“workRelationships”: [{
“LegalEmployerName”:“$plan.LegalEmployerName$”,
“WorkerType”: “$plan.WorkerType”,
“assignments”: [{
“ActionCode”: “$plan.ActionCode$”,
“BusinessUnitName”: “$plan.BusinessUnitName$”,
“UserPersonType”: “$plan.UserPersonType$”
}]
}]
}’

Hi @adyer,

Can you please try once with below curl command.

curl --location 'https://hcmRestApi/resources/11.13.18.05/workers' 
--header 'Content-Type: application/json' 
--header 'REST-Framework-Version: 4' 
--header 'Effective-Of:RangeStartDate=2024-03-27' 
--header 'Authorization: Basic YOUR_AUTHORIZATION_TOKEN_HERE' 
--request POST 
--data-raw '{
  "names": [{
    "LastName": "$plan.LastName$",
    "FirstName": "$plan.FirstName$",
    "LegislationCode": "$plan.LegislationCode$"
  }],
  "emails": [{
    "EmailType": "$plan.EmailType$",
    "EmailAddress": "$plan.EmailAddress$"
  }],
  "workRelationships": [{
    "LegalEmployerName": "$plan.LegalEmployerName$",
    "WorkerType": "$plan.WorkerType$",
    "assignments": [{
      "ActionCode": "$plan.ActionCode$",
      "BusinessUnitName": "$plan.BusinessUnitName$",
      "UserPersonType": "$plan.UserPersonType$"
    }]
  }]
}

Please let us know if that helps.

Regards
Vikas.

@vguleria I tried this and now getting the following error message.

Exception occurred while performing ‘Create’ operation on identity [email protected]’: Url: https://dummyendpoint.com/, Message: 0 : org.apache.http.client.ClientProtocolException, HTTP Error Code: 0

Can you share your Entitlement Schema?

@adyer , I know you might have considered this but just to eliminate any uncertainty.

Can you please check if you’ve replaced the Authorization with your token and did not just copy pasted Vikas’s curl command to postman which has placeholder?

--header 'Authorization: Basic YOUR_AUTHORIZATION_TOKEN_HERE'

@coelhoya2 here is the schema.

[
{
“nativeObjectType”: “user”,
“identityAttribute”: “EmailAddress”,
“displayAttribute”: “EmailAddress”,
“hierarchyAttribute”: null,
“includePermissions”: false,
“features”: ,
“configuration”: {},
“attributes”: [
{
“name”: “PersonId”,
“type”: “STRING”,
“schema”: null,
“description”: “PersonId”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “PersonNumber”,
“type”: “STRING”,
“schema”: null,
“description”: “PersonNumber”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “EmailAddressId”,
“type”: “STRING”,
“schema”: null,
“description”: “EmailAddressId”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “EmailAddress”,
“type”: “STRING”,
“schema”: null,
“description”: “EmailAddress”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “PeriodOfServiceId”,
“type”: “STRING”,
“schema”: null,
“description”: “PeriodOfServiceId”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “UserPersonType”,
“type”: “STRING”,
“schema”: null,
“description”: “UserPersonType”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “BusinessUnitName”,
“type”: “STRING”,
“schema”: {
“type”: “CONNECTOR_SCHEMA”,
“name”: “group”
},
“description”: “BusinessUnitName”,
“isMulti”: true,
“isEntitlement”: true,
“isGroup”: true
},
{
“name”: “JobCode”,
“type”: “STRING”,
“schema”: null,
“description”: “JobCode”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “DefaultExpenseAccount”,
“type”: “STRING”,
“schema”: null,
“description”: “DefaultExpenseAccount”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “LegalEmployerName”,
“type”: “STRING”,
“schema”: null,
“description”: “LegalEmployerName”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “FirstName”,
“type”: “STRING”,
“schema”: null,
“description”: “FirstName”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “LastName”,
“type”: “STRING”,
“schema”: null,
“description”: “LastName”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “DisplayName”,
“type”: “STRING”,
“schema”: null,
“description”: “DisplayName”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “RoleIds”,
“type”: “STRING”,
“schema”: null,
“description”: “RoleIds”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “Username”,
“type”: “STRING”,
“schema”: null,
“description”: “Username”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “GUID”,
“type”: “STRING”,
“schema”: null,
“description”: “GUID”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “LegislationCode”,
“type”: “STRING”,
“schema”: null,
“description”: “LegislationCode”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “EmailType”,
“type”: “STRING”,
“schema”: null,
“description”: “EmailType”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “ActionCode”,
“type”: “STRING”,
“schema”: null,
“description”: “ActionCode”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “WorkerType”,
“type”: “STRING”,
“schema”: null,
“description”: “WorkerType”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “UserId”,
“type”: “STRING”,
“schema”: null,
“description”: “UserId”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
}
],
“name”: “account”
},
{
“nativeObjectType”: “group”,
“identityAttribute”: “BusinessUnitName”,
“displayAttribute”: “BusinessUnitName”,
“hierarchyAttribute”: null,
“includePermissions”: false,
“features”: ,
“configuration”: {},
“attributes”: [
{
“name”: “BusinessUnitName”,
“type”: “STRING”,
“schema”: null,
“description”: “BusinessUnitName”,
“isMulti”: true,
“isEntitlement”: false,
“isGroup”: false
}
],
“name”: “group”
}
]

@Arshad yes i removed the placed holder and entered my authorization token.

1 Like

@coelhoya2 or anyone that could help me with this.