Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/04/2024 07:15 AM
Hi Team,
For an application, we are able to import entitlements and accounts however account to entitlement mapping is not working for us
Below is our API response -
{
"users": [
{
"id": "xxxxxxxxxxxx",
"email": "xxxxxxxxx",
"roles": ["labsmanager"],
"firstName": "xxxx",
"lastName": "xxxxx"
},
{
"id": "xxxxxxxxx",
"email": "xxxxxxx",
"roles": ["labsadmin","admin","sonicstudiobetatester"
],
"firstName": "xxx",
"lastName": "xxxx"
},
}
Following is the json that we are using, please suggest any changes that need to be made -
{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call0": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"httpMethod": "GET",
"url": "https://studio.dev.api.discomax.com/api/identity/v0/users",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "*/*"
}
},
"listField": "users",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "email~#~char",
"customproperty1": "firstName~#~char",
"customproperty2": "lastName~#~char",
"customproperty3": "email~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"page": {
"pageSizeParam": "limit",
"pageSize": 50,
"pageRecordCount": "pageSize",
"pageNumberParam": "page",
"totalCountPath": "completeResponseMap.meta.totalItems",
"firstPageNumber": 0
}
}
}
},
"acctEntMappings": {
"roles": {
"importAsEntitlement": true,
"listPath": "",
"idPath": "roles",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"roles": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://studio.dev.api.discomax.com/api/identity/v0/users",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "users",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "roles[0]~#~char",
"entitlement_value": "roles[0]~#~char"
},
"pagination": {
"page": {
"pageSizeParam": "limit",
"pageSize": 50,
"pageRecordCount": "pageSize",
"pageNumberParam": "page",
"totalCountPath": "completeResponseMap.meta.totalItems",
"firstPageNumber": 0
}
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
06/04/2024 08:14 AM
Refer CP31 Scripting
06/04/2024 09:26 AM
Hi @Gurukrishna96 , try this
acctEntMappings": {
"roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "",
"keyField": "entitlementID"
}
}