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

Getting could not resolve property: entitlement_value error

TheSaviyntBoy
Regular Contributor
Regular Contributor

Hi,

We are trying to import accounts and their associated entitlements into Saviynt. For that: we are using a call2 and dependentCall in the accountParams itself. It is giving the following error: 

 

could not resolve property: entitlement_value of: com.saviynt.ecm.identitywarehouse.domain.Accounts [select new Map(acct.entitlement_value as entitlement_value, acct.id as id) from com.saviynt.ecm.identitywarehouse.domain.Accounts acct where acct.endpointkey.id=9 and (acct.status = '1' or acct.status='Manually Provisioned' or acct.status='PROCESSING')]; nested exception is org.hibernate.QueryException: could not resolve property: entitlement_value of: com.saviynt.ecm.identitywarehouse.domain.Accounts [select new Map(acct.entitlement_value as entitlement_value, acct.id as id) from com.saviynt.ecm.identitywarehouse.domain.Accounts acct where acct.endpointkey.id=9 and (acct.status = '1' or acct.status='Manually Provisioned' or acct.status='PROCESSING')]

 

ImportAccountEntJSON: 

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://hostname.demo.coconutcalendar.com/api/v2/users?limit=1000&page=1",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "data",
"keyField": "name",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "attributes.username~#~char",
"status": "attributes.active~#~char",
"customproperty4": "attributes.active~#~char",
"customproperty1": "attributes.email~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${(response?.completeResponseMap?.get('@odata.nextLink')==null)? null : response?.completeResponseMap?.get('@odata.nextLink')}"
}
}
},
"call2": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://hostname.demo.coconutcalendar.com/api/v2/users/${AccountID}/locations",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"inputParams": {
"dependentCall": true
},
"listField": "data",
"keyField": "entitlement_value",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "attributes.name~#~char",
"customproperty4": "attributes.active~#~char",
"acctEntMappingInfoColumnFromEnt": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
}
}
}

 

If you verify the JSON above, we are bringing the accounts from the target applications in the call1. In the call2, we have given the URL which gives us the associated entitlements per every ID which we are giving as a dynamic value(${AccountID}). 

Could you please help us in the error or if there is any better way to construct the JSON?

Thank you.

8 REPLIES 8

itinjic
Regular Contributor
Regular Contributor

The issue seems to be with the query in the call2 of your accountParams. The error message suggests that the property "entitlement_value" is not found in the Accounts entity. This means that the property name might be different or not available in the entity.

To resolve this issue, you need to ensure that the property name "entitlement_value" exists in the entity "com.saviynt.ecm.identitywarehouse.domain.Accounts".

If the property name is different or not available, you will need to update your query and mapping accordingly.

Please check the entity structure and update the query and mapping in the call2 of your accountParams to match the correct property name.

Sapere aude

That is an issue we are facing currently. 

There isn't any common attribute that maps an account to an entitlement or an entitlement to a account. The only way we can get the account's entitlement is when we call the "https://hostname.demo.coconutcalendar.com/api/v2/users/${AccountID}/locations" url. 

entitlement_value is not column from accounts table.

Please share curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ] as well as postman screenshot

 

use "processingType": "acctToEntMapping",

 

https://docs.saviyntcloud.com/bundle/Dev-Handbook-REST-v24x/page/Content/Developers-Handbook.htm 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak 

These are the curl commands:

To get users:

curl --location 'https://hostname.demo.coconutcalendar.com/api/v2/users/2801628' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'

To get user's entitlements:

curl --location 'https://hostname.demo.coconutcalendar.com/api/v2/users/2801628/locations' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'

Screenshots for user:

TheSaviyntBoy_0-1715767210704.pngTheSaviyntBoy_1-1715767287085.pngTheSaviyntBoy_3-1715767483372.png

The screenshots to get the user entitlement(locations):

TheSaviyntBoy_4-1715767979041.png

TheSaviyntBoy_5-1715768031625.png

 

Change processingType it will work 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak 

The job is getting success now but the entitlements aren't getting mapped to accounts. 

Could you kindly provide a detailed snapshot of the information extracted from the logs, encompassing errors and other pertinent functionality details encountered during the execution of this process? Your assistance in furnishing this information would greatly aid in the analysis and resolution of any issues .


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak @itinjic 

Basically, we are trying to import accounts and entitlementd(EntType: Location) from the target application. 

The accounts get imported via "https://hostname.demo.coconutcalendar.com/api/v2/users?limit=1000&page=1" url.

The locations get imported via "https://hostname.demo.coconutcalendar.com/api/v2/locations" url. 

The issue we are facing is when we are trying to map the accounts to their coresponding locations(Locations is the enttype).

The only way we can get an account's location is via "https://hostname.demo.coconutcalendar.com/api/v2/users/${AccountID}/locations" url (The AccountID in the user is the id of accounts we get in the /users call).

There is no common attribute or identifier that we get in the response of /users or /locations. The only way to map the accounts to their locations is via "https://hostname.demo.coconutcalendar.com/api/v2/users/${AccountID}/locations" url. 

Th issue we are facing is on how do we replicate this in Saviynt compatible JSON so that the call1 will bring all the users via /Users url and the call2 will grab the id from call1 an iteratively for each user, get the locations of that particular user and map them correctly via users/${AccountID}/locations url.