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

Cannot get property 'entitlementname' on null object

asharma
Regular Contributor II
Regular Contributor II

Hi 

I am using a REST connector for Reltio application to import accounts and roles. I have successfully imported the accounts using unique key as cp1 for email. Now, I am trying to import the roles and map them to accounts however I can see there is only 1 attribute at app side that is 'roleName' and I am using below ImportAccountEntJSON JSON and getting error 'Cannot get property 'entitlementname' on null object'.

ImportAccountEntJSON

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://abc.xyz.com/oauth/users",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"httpMethod": "GET"
},
"statusConfig": {
"active": "true",
"inactive": "false"
},
"listField": "",
"keyField": "customproperty1",
"colsToPropsMap": {
"name": "username~#~char",
"customproperty1": "email~#~char",
"customproperty2": "enabled~#~char",
"customproperty3": "credentialsNonExpired~#~char",
"customproperty4": "externalUser~#~char"
}
}
},
"acctEntMappings": {
"Role": {
"listPath": "Role",
"idPath": "UserRoleId",
"keyField": "entitlement_value"
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"entTypeOrder": 1,
"entTypeLabels": {},
"call": {
"call1": {
"connection": "userAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://abc.xyz.com/admin/roles/users",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "records",
"keyField": "entitlement_Value",
"colsToPropsMap": {
"entitlementID": "Id~#~char",
"entitlement_value": "roleName~#~char",
"displayName": "roleName~#~char",
"description": "Label~#~char"
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

 

Please suggest where I am going in wrong directions

16 REPLIES 16

rushikeshvartak
All-Star
All-Star

"acctEntMappings": {
"Role": {
"listPath": "Role",
"idPath": "UserRoleId",
"keyField": "entitlementID"
}
}
},


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

asharma
Regular Contributor II
Regular Contributor II

Hi Rushikesh,

I am still getting the same error.

Also, there is no entitlementID at the target side. there is only 1 attribute that is entitlement value / roleName

Kindly suggest accordingly on the above JSON

Share API Response


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

asharma
Regular Contributor II
Regular Contributor II

Hi Rushikesh,

Below is the response from API.

[
"ROLE_USER",
"ROLE_TEST_READONLY",
"ROLE_TEST_SERVICES",
"ROLE_CUSTOM_USER",
"ROLE_ADMIN_USER",
"ROLE_READ",
"ROLE_API",
"ROLE_DUMMY"
]

Refer https://forums.saviynt.com/t5/general-discussions/rest-api-import-roles-from-array-response/m-p/2304...


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

asharma
Regular Contributor II
Regular Contributor II

Hi Rushikesh,

Seems it is the same issue which is with me however I cannot see the JSON on that forum. Is it possible if you can provide the JSON so that I can also try the same JSON at my end.

asharma
Regular Contributor II
Regular Contributor II

Hi Rushikesh,

Please share the JSON asap as per above to start my testing as it is not available on your shared forum link.

rushikeshvartak_0-1709005219486.png

 


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

asharma
Regular Contributor II
Regular Contributor II

Hi Rushikesh,

We are not sure if entitlements were created from UI in target app as it is not at the Saviynt end. Please suggest if we need to proceed to import the entitlements manually in Saviynt in my scenario or is there any other way.

You need to import manully


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

adarshk
Saviynt Employee
Saviynt Employee

Hi @asharma 

When you try to import accounts and access from target and pull the data on postman, what API are you referring? Are you using the same API to bring in accounts and roles(entitltments) or through different API's

Please share the complete postman request and response. 

asharma
Regular Contributor II
Regular Contributor II

Hi Adarsh,

I am using below API's in Postman.

Get usershttps://auth.reltio.com/oauth/users 

Get Roleshttps://auth.reltio.com/admin/roles/users/ 

Postman response

Get Users - 

[
    {
        "customer": "0mDLrr8",
        "username": "Sundar_Sankaran",
        "email": "Sundar_Sankaran@domain.com",
        "entity": null,
        "externalTokens": [],
        "tenants": [],
        "enabled": true,
        "accountNonExpired": true,
        "credentialsNonExpired": true,
        "accountNonLocked": true,
        "roles": [],
        "externalUser": false,
        "locale": "en_US",
        "timezone": "Etc/GMT",
        "userPermissions": {
            "roles": {
                "ROLE_API": [
                    "DKK8ZZ876XZLtrL"
                ],
                "ROLE_USER": [
                    "DKK8ZZ876XZLtrL"
                ]
            },
            "permissions": {},
            "permissionsByService": {}
        },
        "groups": [
            "OKTA_RELTIO_VENDOR_MDM_Configuration_Group_UAT",
            "OKTA_RELTIO_VENDOR_RDM_Configuration_Group_UAT"
        ],
        "encrypted": true,
        "passwordChangedDate": 1701120066458,
        "lastLoginDate": 1708390381565,
        "numberFailedLoginAttempts": 0
    },
 
Get Roles,
[
"ROLE_USER",
"ROLE_TEST_READONLY",
"ROLE_TEST_SERVICES",
"ROLE_CUSTOM_USER",
"ROLE_ADMIN_USER",
"ROLE_READ",
"ROLE_API",
"ROLE_DUMMY"
]

[This message has been edited by moderator to mask email domain]

asharma
Regular Contributor II
Regular Contributor II

Hi @adarshk , Is there any update on above?

adarshk
Saviynt Employee
Saviynt Employee

Please validate ListFields and Keyfield mapping. 
entitlement_value needs to be consistent across the JSON. 

ListField is mapped to 'records', please confirm if this is the right attribute used in postman call aswell

Share the postman request response screenshots for Role and user calls. 

asharma
Regular Contributor II
Regular Contributor II

Hi Adarsh,

I have already posted the postman request and response above responses to you. please check them.

You need to create entitlements manually as its list and not key value


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