09/22/2023 11:20 AM
Hi All,
We have a REST application - there is no api to get account their entitlements mapping.
We have to pass each AccountID to get account - as per documentation we are using 'httpAcctToEnt'
Below is ImportAccEntJson - (This is not bringing any entitlements )
=============================
{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"deleteLinks": true,
"accountThresholdValue": 1000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false,
"deleteAccEntForActiveAccounts": true,
"statusColumn": "customproperty17",
"activeStatus": ["Active"]
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/rest/v14/users/",
"httpHeaders": {
"Authorization": "Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Accept": "application/json"
},
"httpMethod": "GET",
"httpContentType": "application/json"
},
"listField": "items",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "login~#~char",
"name": "email~#~char",
"customproperty1": "lastName~#~char",
"customproperty2": "firstName~#~char",
"customproperty3": "jobTitle~#~char",
"customproperty4": "email~#~char",
"customproperty5": "enabledForSso.value~#~char",
"customproperty6": "enabledForSso.displayValue~#~char",
"customproperty7": "partnerLogin~#~char",
"customproperty8": "isNotifyFax~#~bool",
"customproperty9": "separateShipAddr~#~bool",
"customproperty10": "isNotifyEmail~#~bool",
"customproperty11": "isSuperUserPermEnabled~#~bool",
"customproperty12": "isWebServicesOnly~#~bool",
"customproperty13": "dateModified~#~char",
"customproperty14": "dateAdded~#~char",
"customproperty15": "company.name~#~char",
"displayName": "email~#~char",
"customproperty16": "status.value~#~char",
"customproperty17": "status.displayValue~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {}
},
"entitlementParams": {},
"acctEntParams": {
"connection": "userAuth",
"entTypes": {
"Groups": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "httpAcctToEnt",
"http": {
"httpHeaders": {
"Authorization": "Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/rest/v14/companies/_host/users/${login}/groups",
"httpMethod": "GET"
},
"listField": "items",
"entIdPath": "variableName",
"acctKeyField": "accountID"
}
}
}
}
}
}
any idea what i am doing wrong here ?
Thanks,
suresh
09/25/2023 01:26 AM
Hello @IAM_99,
You "entitlementParams": {} and "acctEntMappings": {}
is empty, please make sure the enitltment is imported. Please try with the below json instead of ${login} please ${id}
{
"accountParams":{
"connection":"userAuth",
"processingType":"SequentialAndIterative",
"statusAndThresholdConfig":{
"deleteLinks":true,
"accountThresholdValue":1000,
"correlateInactiveAccounts":true,
"inactivateAccountsNotInFile":false,
"deleteAccEntForActiveAccounts":true,
"statusColumn":"customproperty17",
"activeStatus":[
"Active"
]
},
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url":"https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/rest/v14/users/",
"httpHeaders":{
"Authorization":"Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Accept":"application/json"
},
"httpMethod":"GET",
"httpContentType":"application/json"
},
"listField":"items",
"keyField":"accountID",
"colsToPropsMap":{
"accountID":"login~#~char",
"name":"email~#~char",
"customproperty1":"lastName~#~char",
"customproperty2":"firstName~#~char",
"customproperty3":"jobTitle~#~char",
"customproperty4":"email~#~char",
"customproperty5":"enabledForSso.value~#~char",
"customproperty6":"enabledForSso.displayValue~#~char",
"customproperty7":"partnerLogin~#~char",
"customproperty8":"isNotifyFax~#~bool",
"customproperty9":"separateShipAddr~#~bool",
"customproperty10":"isNotifyEmail~#~bool",
"customproperty11":"isSuperUserPermEnabled~#~bool",
"customproperty12":"isWebServicesOnly~#~bool",
"customproperty13":"dateModified~#~char",
"customproperty14":"dateAdded~#~char",
"customproperty15":"company.name~#~char",
"displayName":"email~#~char",
"customproperty16":"status.value~#~char",
"customproperty17":"status.displayValue~#~char",
"customproperty31":"STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings":{
}
},
"entitlementParams":{
},
"acctEntParams":{
"connection":"userAuth",
"entTypes":{
"Groups":{
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"processingType":"httpAcctToEnt",
"http":{
"httpHeaders":{
"Authorization":"Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"url":"https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/rest/v14/companies/_host/users/${id}/groups",
"httpMethod":"GET"
},
"listField":"items",
"entIdPath":"variableName",
"acctKeyField":"accountID"
}
}
}
}
}
}
09/25/2023 09:21 AM
"entitlementParams": {} and "acctEntMappings": {} These are not mandatory. more over
"entitlementParams" - we dont have an api to create Entitlements metadata, So created Static way.
${id} is an example given in the documentation, our accountId is mapped with ${login} so it should be ${login}
Thanks,
suresh
09/25/2023 09:38 AM
Hello @IAM_99 ,
Did you try using the above json which i shared, are you seeing any error in the logs?
could you please also share the postman response.
Thanks,
09/25/2023 12:01 PM
Hi @sudeshjaiswal , Yeah tried it was calling only 'accountParams' (bold part below)
below part it was not calling.
{
"accountParams":{
"connection":"userAuth",
"processingType":"SequentialAndIterative",
"statusAndThresholdConfig":{
"deleteLinks":true,
"accountThresholdValue":1000,
"correlateInactiveAccounts":true,
"inactivateAccountsNotInFile":false,
"deleteAccEntForActiveAccounts":true,
"statusColumn":"customproperty17",
"activeStatus":[
"Active"
]
},
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url":"https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/rest/v14/users/",
"httpHeaders":{
"Authorization":"Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Accept":"application/json"
},
"httpMethod":"GET",
"httpContentType":"application/json"
},
"listField":"items",
"keyField":"accountID",
"colsToPropsMap":{
"accountID":"login~#~char",
"name":"email~#~char",
"customproperty1":"lastName~#~char",
"customproperty2":"firstName~#~char",
"customproperty3":"jobTitle~#~char",
"customproperty4":"email~#~char",
"customproperty5":"enabledForSso.value~#~char",
"customproperty6":"enabledForSso.displayValue~#~char",
"customproperty7":"partnerLogin~#~char",
"customproperty8":"isNotifyFax~#~bool",
"customproperty9":"separateShipAddr~#~bool",
"customproperty10":"isNotifyEmail~#~bool",
"customproperty11":"isSuperUserPermEnabled~#~bool",
"customproperty12":"isWebServicesOnly~#~bool",
"customproperty13":"dateModified~#~char",
"customproperty14":"dateAdded~#~char",
"customproperty15":"company.name~#~char",
"displayName":"email~#~char",
"customproperty16":"status.value~#~char",
"customproperty17":"status.displayValue~#~char",
"customproperty31":"STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings":{
}
},
"entitlementParams":{
},
"acctEntParams":{
"connection":"userAuth",
"entTypes":{
"Groups":{
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"processingType":"httpAcctToEnt",
"http":{
"httpHeaders":{
"Authorization":"Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"url":"https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/rest/v14/companies/_host/users/${id}/groups",
"httpMethod":"GET"
},
"listField":"items",
"entIdPath":"variableName",
"acctKeyField":"accountID"
}
}
}
}
}
}
Thanks,
suresh
09/25/2023 12:16 PM
Accounts api resposne :
Groups URL
09/26/2023 03:33 AM - edited 09/26/2023 03:35 AM
Hi @IAM_99
The REST Connector creates a map of all the AccountKeyField property values (In your case it is accountID) and iterates using a binding variable called ${id} in case of httpAcctToEnt association so, it does not matter what you have the account property mapped from the API response.
Please use the below import JSON updated with a few changes & run access import and let us know if it helps.
{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"deleteLinks": true,
"accountThresholdValue": 1000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false,
"deleteAccEntForActiveAccounts": true,
"statusColumn": "customproperty17",
"activeStatus": [
"Active"
]
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/rest/v14/users/",
"httpHeaders": {
"Authorization": "Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Accept": "application/json"
},
"httpMethod": "GET",
"httpContentType": "application/json"
},
"listField": "items",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "login~#~char",
"name": "email~#~char",
"customproperty1": "lastName~#~char",
"customproperty2": "firstName~#~char",
"customproperty3": "jobTitle~#~char",
"customproperty4": "email~#~char",
"customproperty5": "enabledForSso.value~#~char",
"customproperty6": "enabledForSso.displayValue~#~char",
"customproperty7": "partnerLogin~#~char",
"customproperty8": "isNotifyFax~#~bool",
"customproperty9": "separateShipAddr~#~bool",
"customproperty10": "isNotifyEmail~#~bool",
"customproperty11": "isSuperUserPermEnabled~#~bool",
"customproperty12": "isWebServicesOnly~#~bool",
"customproperty13": "dateModified~#~char",
"customproperty14": "dateAdded~#~char",
"customproperty15": "company.name~#~char",
"displayName": "email~#~char",
"customproperty16": "status.value~#~char",
"customproperty17": "status.displayValue~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {}
},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Groups": {}
}
},
"acctEntParams": {
"connection": "userAuth",
"acctKeyField": "accountID",
"entTypes": {
"Groups": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "httpAcctToEnt",
"http": {
"httpHeaders": {
"Authorization": "Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/rest/v14/companies/_host/users/${id}/groups",
"httpMethod": "GET"
},
"listField": "items",
"entIdPath": "variableName",
"entKeyField": "entitlementID"
}
}
}
}
}
}
Thanks