and more in a single search tool across platforms. Read the announcement here. |
01/03/2024 12:52 AM - last edited on 01/03/2024 04:14 AM by Sunil
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{
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.
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]
01/03/2024 11:04 PM
Can you confirm the response from Postman?
01/03/2024 11:11 PM
Hi Adarsh,
Please find the postman response(This is to get all users)
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?
01/04/2024 11:46 PM
Can you add cleanUpTextContent in Connection JSON.
with "httpContentType": "application/json",
Ref:
https://docs.saviyntcloud.com/bundle/REST-v55x/page/Content/Developers-Handbook.htm
01/05/2024 06:37 AM - edited 01/05/2024 06:38 AM
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.