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

REST connector mapping entitlements based on CustomProperty

jeaton3
New Contributor
New Contributor

I am integrating a REST API, and the entitlements are returned as:

 

 

{
    "item_list": [
        {
            "property_value_map": {
                "AccessLevelID": 813,
                "BadgeKey": 7139
            }
        },
        {
            "property_value_map": {
                "AccessLevelID": 813,
                "BadgeKey": 34942
            }
        }
    ]
}

 

The AccessLevelID value is the same as the entitlementID mapped in entitlementParams.  The BadgeKey value is the same as the value mapped to CustomProperty1 in AccountParams.

Is it possible to import this?  The API allows me to query either for all AccessLevel entries, or iterate each of them individually so I can do it either via one call or one call per entitlement.  I tried various things like: 

 

    "acctEntParams": {
        "connection": "acctAuth",
        "entTypes": {
            "AccessLevel": {
                "entTypeOrder": 0,
                "call": {
                    "call1": {
                        "callOrder": 0,
                        "stageNumber": 0,
                        "processingType": "httpEntToAcct",
                        "http": {
                            "httpContentType": "application/json",
                            "httpHeaders": {
                                "Accept": "application/json"
                            },
                            "httpMethod": "GET",
                            "httpParams": "{}",
                            "url": "https://<<url>>/?session_token=${access_token}&filter=AccessLevelID=${id}"
                        },
                        "listField": "item_list",
                        "entKeyField": "entitlementID",
                        "entIdField": "property_value_map.AccessLevelID",
                        "acctKeyField": "customproperty1",
                        "acctIdPath": "property_value_map.BadgeKey"
                    }
                }
            }
        }
    }

 

Is it possible to map entitlements to accounts by matching on the account's CustomProperty1 value?

11 REPLIES 11

rushikeshvartak
All-Star
All-Star

Yes you can are you facing any issues ?


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

Yes.  My current JSON is this and does not work.  It properly loads the account entry and sets customproperty1 to the BadgeKey value (in my test case, 34942).  The entitlement  is populated, and entitlementID is set to the correct value (813) and name.  However, the mapping is not done.  I don't see any accounts getting the entitlement.

I've attached my most recent version of my ImportAccountEntJSON

 

Please share api response 


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

The API response is in my first post.  It just looks like:

 

{
    "item_list": [
        {
            "property_value_map": {
                "AccessLevelID": 813,
                "BadgeKey": 7139
            }
        },
        {
            "property_value_map": {
                "AccessLevelID": 813,
                "BadgeKey": 34942
            }
        }
    ]
}

Any concern for using entitlement id over cp1 ?


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

Looking in the logs, as far as I can tell the URL in the acctEntParams block is never getting called at all.  I can see it try the connection from entitlementParams to get the list of entitlements and their names.  It gets a 401, then does the authentication call which succeeds, then retries the entitlementParams call.  That returns a 200, and it correctly pulls the data out

 pullObjectsByRest - responseMap.size : 8
 pullObjectsByRest - objectList.size : 1

There's a total of 8 attributes in the JSON in this api result including the pagination attributes, and there's exactly one entitlement in the list of entitlements in my test system, so that looks right, and I can confirm that the AccessLevelID is 813 and the name is being correctly set if I do a query in the data analyzer:

select entitlementid, displayname, entitlement_value, status, entitlementtypekey from entitlement_values where entitlementid=813 and entitlementtypekey=298

813Admin Dept - IT - Information Security - StaffAdmin Dept - IT - Information Security - Staff1298
 
but I never see a call to my API endpoint to fetch the entitlement  to account mappings.  I attached what I could get out of the logs for the access job.

Are you running access import in job config ?


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

jeaton3-wpi
New Contributor
New Contributor

I found an extraneous "showlogs: true" in my acctEntParams block which seems to have been preventing it from ever calling the API. 

Now I do see the call to the API endpoint to get the mappings, and it does iterate over the values and looks like it correclty finds the account based on the customProperty1 value like I want, but I think that it's failing to locate the entitlement based on the entitlementID value:

 

2024-04-09T13:41:35-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-6-DEBUG-ACCKEY:88991905;ENTVALKEY:null
 
2024-04-09T13:41:35-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-6-DEBUG-inside processAccountEntitlements
 
2024-04-09T13:41:35-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-6-DEBUG-ACCKEY:88991906;ENTVALKEY:null
 
2024-04-09T13:41:35-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-6-DEBUG-delete inactive account linking: true
 
The configuration that works this far is:
 
 

 

    "acctEntParams": {
        "entTypes": {
            "AccessLevel": {
                "call": {
                    "call1": {
						"callOrder": 0,
                        "stageNumber": 0,
						"processingType": "http",
				        "connection": "acctAuth",
                        "http": {
                            "httpContentType": "application/json",
                            "httpHeaders": {
                                "Accept": "application/json"
                            },
                            "httpMethod": "GET",
                            "httpParams": "{}",
                            "url": ""
                        },
                        "listField": "item_list",
                        "entKeyField": "entitlementID",
                        "entIdField": "property_value_map.AccessLevelID",
                        "acctKeyField": "customproperty1",
                        "acctIdPath": "property_value_map.BadgeKey"
                    }
				}
            }
        }
    }

 

it seems like its a very straightforward config and should work. 

Make blank

listField

 


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

jeaton3-wpi
New Contributor
New Contributor

and after going through it line by line, I found the mistake:

 

                        "entIdField": "property_value_map.AccessLevelID",

 

should be

 

                        "entIdPath": "property_value_map.AccessLevelID",

 

I can now see the entitlments being mapped in the logs (and see them in the UI):

2024-04-09T14:01:58-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-DEBUG-inside processAccountEntitlements
 
2024-04-09T14:01:58-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-DEBUG-ACCKEY:88991905;ENTVALKEY:269968
 
2024-04-09T14:01:58-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-DEBUG-inside processAccountEntitlements
 
2024-04-09T14:01:58-04:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-DEBUG-ACCKEY:88991906;ENTVALKEY:269968
 

Great you resolved issue.


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