We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Rest - Issue with account and entitlement mapping

NM
Regular Contributor II
Regular Contributor II

Hi Team,

We are facing an issue with account and entitlement mapping, We are able to import accounts and entitlement but when we are trying to map it under acctentparam it is not happening.

We have a single user API consisting of roles for which we are using ${id}, We are planning to import roles via CSV and map it using API call.

Below JSON is for single user import

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": null,
"doNotChangeIfFailed": true,
"statusAndThresholdConfig": {
"accountThresholdValue": 50
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "YYYY",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "data.id~#~char",
"name": "data.email~#~char",
"status": "data.status~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"

}
}
},
"acctEntMappings": {
"Teams": {
"listPath": "data.user_teams",
"idPath": "",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"unsuccessResponses": null,
"doNotChangeIfFailed": true,
"entTypes": {
"Teams": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "abc",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "data",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char"
},
"disableDeletedEntitlements": true
}
}
}
}
},
"acctEntParams": {
"connection": "userAuth",
"entTypes": {
"Role": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "http",
"http": {
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"url": "YYYY/${id}.json",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"entKeyField": "entitlementID",
"entIdPath": "data.projects.5e6",
"acctIdPath": "data.id",
"acctKeyField": "accountID"
}
}
},
"Teams": {
"call": {
"call2": {
"callOrder": 1,
"stageNumber": 1,
"processingType": "acctToEntMapping"
}
}
}
}
}
}

Postman API response (For a single user)

{

data{

"id""mmmm",
 "type""agent",
Few more user attributes,
projects": {
         "5e69""Writer"
        },
}

Few points-

Why we are not using cp31 for roles

      For some of the roles in user profile it is stored with a number string and not with a proper name and we are facing issue with entitlement import for teams(Not getting imported) when we define "Role" under entitlement param call as empty({})

As checked in logs, I see Role under acctent but don't see any URL been called to get the details. Teams entitlement type mapping works fine.

 

NM_1-1704273315518.png

Update:

It works fine now, and we are able to map accounts with entitlement but in logs the API details/response are coming under "responseError" tag. what could be the reason.

[This message has been edited by moderator to merge reply comment]

4 REPLIES 4

adarshk
Saviynt Employee
Saviynt Employee

Can you confirm the response from Postman? 

NM
Regular Contributor II
Regular Contributor II

Hi Adarsh,

Please find the postman response(This is to get all users)

NM_0-1704352156732.png

My main concern is even though I can see accounts and entitlement getting imported but i see responseError tag in logs getting populated with API response and not with "null", What could be the reason for that?

adarshk
Saviynt Employee
Saviynt Employee

Can you add cleanUpTextContent in Connection JSON.

with "httpContentType": "application/json",

Ref:

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

NM
Regular Contributor II
Regular Contributor II

Hi Adarsh,

Still the same result.

Connection json for your reference

{
"authentications": {
"userAuth": {
"authType": "Basic",
"httpMethod": "POST",
"httpParams": {},
"httpHeaders": {},
"properties": {
"userName":"abc",
"password":"abc"
},
"authError": [
"InvalidAuthenticationToken",
"Couldn’t aunthenticate you",
"AuthenticationFailed"
],
"timeOutError": "Read timed out",
"errorPath": "data",
"cleanUpTextContent": true,
"maxRefreshTryCount": 5,
"httpContentType": "application/json",
"retryFailureStatusCode": [
401
],
"tokenType": "Basic",
"accessToken": "Basic xx"
}
}
}

 

Created an account on application end .. account and entitlement mapping successfully imported but responseError still shows application API response.