Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Entitlement is not imported in REST Connector

mansoorahmed1
New Contributor III
New Contributor III

Im trying to import accounts and entitlement from single API call. As account import gives below response which contain the entitlement values . I used below JSON , CP31 is populated, jobs completed successfully but the entitlement is not getting created.

API Response:

{
"accounts": [
{
"userid": "T03096",
"firstName": "XX",
"lastName": "XX",
"location": "Wallsend Depot",
"status": "Active",
"entitlements": [
"ICT Metering Systems_mbsrole5"
]
},
{
"userid": "T30747",
"firstName": "XXX",
"lastName": "XXX",
"location": "Silverwater Learning Centre",
"status": "Active",
"entitlements": [
"Meter Provision_mbsrole2"
]
}
]
}

 

IMPORT JSON:

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty10",
"activeStatus": [
"Active"
],
"deleteLinks": true,
"accountThresholdValue": 10000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": true,
"deleteAccEntForActiveAccounts": true
},
"call": {
"call1": {
"http": {
"url": "abc",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/JSON",
"x-ehub-apikey": "XXXXX"
},
"httpContentType": "application/json",
"httpMethod": "POST"
},
"listField": "accounts",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "userid~#~char",
"name": "userid~#~char",
"customproperty1": "firstName~#~char",
"customproperty2": "lastName~#~char",
"customproperty3": "location~#~char",
"customproperty10": "status~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"entitlements": {
"importAsEntitlement": true,
"listPath": "entitlements",
"idPath": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "entitlements~#~char",
"entitlement_value": "entitlements~#~char"
}
}
}
},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"entitlements": {}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

 

CP31: {"entitlements":{"entIds":["ICT Metering Systems_mbsrole5"],"keyField":"entitlementID"}}

 

No error in the logs(attached)

@Vedanth_BK any assistance on this would be helpfull.

4 REPLIES 4

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @mansoorahmed1,

Please try with below mapping.

 

"acctEntMappings": {
"entitlements": {
"importAsEntitlement": true,
"listPath": "accounts.entitlements",
"idPath": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "entitlements~#~char",
"entitlement_value": "entitlements~#~char"
}

 

Thanks

If you find the above response useful, Kindly Mark it as "Accept As Solution".

@sudeshjaiswal Thank you for the reponse. I was able to fix this with below JSON since all user will have single entitlement this seems to be working. I tried the same for another application with similar JSON schema however there users will have multiple entitlements there so this isnt working meaning CP31 is poulated but the entitlements arent getting created .

Whats the possible solution for that ?

 

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty10",
"activeStatus": [
"Active"
],
"deleteLinks": true,
"accountThresholdValue": 10000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": true,
"deleteAccEntForActiveAccounts": true
},
"call": {
"call1": {
"http": {
"url": "https://api",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/JSON",
"x-ehub-apikey": "b)pyncahSw_.D@J-FFWXmM>,xRaVg6vh"
},
"httpContentType": "application/json",
"httpMethod": "POST"
},
"listField": "accounts",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "userid~#~char",
"name": "userid~#~char",
"customproperty1": "firstName~#~char",
"customproperty2": "lastName~#~char",
"customproperty3": "location~#~char",
"customproperty10": "status~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},

"acctEntMappings": {
"entitlements": {
"listPath": "entitlements",
"idPath": "",
"keyField": "entitlementID"
}
}
"acctEntMappings": {
"entitlements": {
"importAsEntitlement": true,
"listPath": "entitlements",
"idPath": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "entitlementID~#~char",
"entitlement_value": "entitlement_value~#~char"
}
}
}
},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"entitlements": {}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @mansoorahmed1,

May i know why you are using the two "acctEntMappings"  in the single json.
You may try removing the below from the above json and try 
------------

"acctEntMappings": {
"entitlements": {
"listPath": "entitlements",
"idPath": "",
"keyField": "entitlementID"
}
-------------------------
And for other issuse would request you to create the seprate forum post.

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Oh sorry that was typo, I was comparing the fields. In the actual json I used only once. Thanks for notifying and yes I will raise another forum for that .