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

Unable to create entitlements from ImportAccountEntJSON

Ben
New Contributor
New Contributor

Hi All,

I'm integrating a third party application that only has a users api that returns the users and their role (sample response below).

 

"users": [
        {
            "id": "abc",
            "email": "bob@bob.com",
            "role": "developer",
            "name": {
                "first": "bob",
                "middle": "",
                "last": "smith"
            },
            "status": "enabled",
            "invite-date": "2021-04-28T01:46:14.850Z",
            "last-login-date": "2023-12-28T09:33:26.534Z",
            "tags": [
                "def"
            ],
            "preferredDevLanguages": [],
            "team": {
                "name": "React"
            }
        }]

 

 As there is no entitlement api, i'm trying to create the entitlements from this call with acctEntMappings. CP31 get's populated correctly - {"Role":{"entIds":["developer"],"keyField":"entitlementID"}} - however, the enitlement just doesn't get created. Is anyone able to help me here? JSON is below.

 

{
    "globalSettings": {
        "dateFormat": "yyyy-MM-dd'T'HH:mm:ss"
    },
    "accountParams": {
        "connection": "userAuth",
        "processingType": "SequentialAndIterative",
        "call": {
            "call1": {
                "callOrder": 0,
                "stageNumber": 0,
                "http": {
                    "url": "URL",
                    "httpHeaders": {
                        "x-api-key": "${connection.xapikey}"
                    },
                    "httpContentType": "application/json",
                    "httpMethod": "GET"
                },
                "listField": "users",
                "keyField": "accountID",
                "statusConfig": {
                    "active": "enabled",
                    "inactive": "disabled"
                },
                "colsToPropsMap": {
                    "accountID": "id~#~char",
                    "name": "email~#~char",
                    "displayName": "#CONST#${return response.name.first+\" \" +response.name.last}~#~char",
                    "customproperty2": "email~#~char",
                    "status": "status~#~char",
                    "lastlogondate": "last-login-date~#~date",
                    "customproperty11": "#CONST#${response.tags.size() > 0  ? response.tags[0].replace('[','').replace('TM','').replace(']','') : null}~#~char",
                    "customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
                }
            }
        },
        "acctEntMappings": {
            "Role": {
                "importAsEntitlement": true,
                "listPath": "",
                "idPath": "role",
                "keyField": "entitlementID",
                "colsToPropsMap": {
                    "entitlement_value": "role~#~char",
                    "entitlementID": "role~#~char",
                    "displayname": "role~#~char"
                }
            }
        },
        "entitlementParams": {
            "connection": "userAuth",
            "processingType": "SequentialAndIterative",
            "entTypes": {
                "Role": {}
            }
        },
        "acctEntParams": {
            "processingType": "acctToEntMapping"
        }
    }
}

 

12 REPLIES 12

rushikeshvartak
All-Star
All-Star

"listPath" : "users"


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

Hi Rushikesh,

When updating "listPath": "users" CP31 gets changed to "{}" and the entitlements are still not created

{
    "globalSettings": {
        "dateFormat": "yyyy-MM-dd'T'HH:mm:ss"
    },
    "accountParams": {
        "connection": "userAuth",
        "processingType": "SequentialAndIterative",
        "call": {
            "call1": {
                "callOrder": 0,
                "stageNumber": 0,
                "http": {
                    "url": "URL",
                    "httpHeaders": {
                        "x-api-key": "${connection.xapikey}"
                    },
                    "httpContentType": "application/json",
                    "httpMethod": "GET"
                },
                "listField": "users",
                "keyField": "accountID",
                "statusConfig": {
                    "active": "enabled",
                    "inactive": "disabled"
                },
                "colsToPropsMap": {
                    "accountID": "id~#~char",
                    "name": "email~#~char",
                    "displayName": "#CONST#${return response.name.first+\" \" +response.name.last}~#~char",
                    "customproperty2": "email~#~char",
                    "status": "status~#~char",
                    "lastlogondate": "last-login-date~#~date",
                    "customproperty11": "#CONST#${response.tags.size() > 0  ? response.tags[0].replace('[','').replace('TM','').replace(']','') : null}~#~char",
                    "customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
                }
            }
        },
        "acctEntMappings": {
            "Role": {
                "importAsEntitlement": true,
                "listPath": "users",
                "idPath": "role",
                "keyField": "entitlementID",
                "colsToPropsMap": {
                    "entitlement_value": "role~#~char",
                    "entitlementID": "role~#~char",
                    "displayname": "role~#~char"
                }
            }
        },
        "entitlementParams": {
            "connection": "userAuth",
            "processingType": "SequentialAndIterative",
            "entTypes": {
                "Role": {}
            }
        },
        "acctEntParams": {
            "processingType": "acctToEntMapping"
        }
    }
}

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

Same issue, CP31 changes to "{}" and no entitlements are created in Saviynt.

Refer samples 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.

Thanks Rushikesh. Unfortunately, that doesn't really help, as the JSON is already configured as per the samples and recommendations from other posts on the forum and there are no errors in the logs, but for whatever reason, the entitlements just wont create.

Does entitlement type exists under Endpoint ?


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

Yeah, the entitlement type was generatedmsedge_f5NnxLauha.png

Vedanth-BK
Regular Contributor
Regular Contributor

Hey @Ben 

Please use the below JSON and run both account and access  recon jobs 

{
  "globalSettings": {
    "dateFormat": "yyyy-MM-dd'T'HH:mm:ss"
  },
  "accountParams": {
    "connection": "userAuth",
    "processingType": "SequentialAndIterative",
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "URL",
          "httpHeaders": {
            "x-api-key": "${connection.xapikey}"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "listField": "users",
        "keyField": "accountID",
        "statusConfig": {
          "active": "enabled",
          "inactive": "disabled"
        },
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "email~#~char",
          "displayName": "#CONST#${return response.name.first+\" \" +response.name.last}~#~char",
          "customproperty2": "email~#~char",
          "status": "status~#~char",
          "lastlogondate": "last-login-date~#~date",
          "customproperty11": "#CONST#${response.tags.size() > 0  ? response.tags[0].replace('[','').replace('TM','').replace(']','') : null}~#~char",
          "customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
        }
      }
    },
    "acctEntMappings": {
      "Role": {
        "importAsEntitlement": true,
        "listPath": "",
        "idPath": "role",
        "keyField": "entitlementID",
        "colsToPropsMap": {
          "entitlement_value": "entitlement_value~#~char",
          "entitlementID": "entitlementID~#~char"
        }
      }
    },
    "entitlementParams": {
      "connection": "userAuth",
      "processingType": "SequentialAndIterative",
      "entTypes": {
        "Role": {}
      }
    },
    "acctEntParams": {
      "processingType": "acctToEntMapping"
    }
  }
}
Thank you
Vedanth B.K

Ben
New Contributor
New Contributor

Thanks @Vedanth-BK, that seemed to work to get the entitlements created. CP31 is populated correctly, but they don't seem to be associating with the accounts

Vedanth-BK
Regular Contributor
Regular Contributor

 syntax error, please try with the below JSON.
Note: run both account and access import

{
  "globalSettings": {
    "dateFormat": "yyyy-MM-dd'T'HH:mm:ss"
  },
  "accountParams": {
    "connection": "userAuth",
    "processingType": "SequentialAndIterative",
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "URL",
          "httpHeaders": {
            "x-api-key": "${connection.xapikey}"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "listField": "users",
        "keyField": "accountID",
        "statusConfig": {
          "active": "enabled",
          "inactive": "disabled"
        },
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "email~#~char",
          "displayName": "#CONST#${return response.name.first+\" \" +response.name.last}~#~char",
          "customproperty2": "email~#~char",
          "status": "status~#~char",
          "lastlogondate": "last-login-date~#~date",
          "customproperty11": "#CONST#${response.tags.size() > 0  ? response.tags[0].replace('[','').replace('TM','').replace(']','') : null}~#~char",
          "customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
        }
      }
    },
    "acctEntMappings": {
      "Role": {
        "importAsEntitlement": true,
        "listPath": "",
        "idPath": "role",
        "keyField": "entitlementID",
        "colsToPropsMap": {
          "entitlement_value": "entitlement_value~#~char",
          "entitlementID": "entitlementID~#~char"
        }
      }
    }
  },
  "entitlementParams": {
    "connection": "userAuth",
    "processingType": "SequentialAndIterative",
    "entTypes": {
      "Role": {}
    }
  },
  "acctEntParams": {
    "processingType": "acctToEntMapping"
  }
}



Thank you
Vedanth B.K

Ben
New Contributor
New Contributor

Legend, thanks @Vedanth-BK that worked. And thanks @rushikeshvartak for your help earlier