06/06/2023 01:42 AM
HI Everyone,
can someone advise? if I am doing wrong while importing accounts and access. i am able to import users' accounts and entitlement but the account is not mapped with the account. please advise how to map the entitlement with the account. Also if you can let me know what is "idPath": "role" and from where it comes?
Here is accountImportJSON
Postman response from EndSystem
Here is AccountImportJSON
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"inactivateAccountsNotInFile": false,
"accountThresholdValue": 20
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "<endpoint_url>config/authorization/users",
"httpHeaders": {
"x-api-key": "<API_key>",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpParams": {},
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "email~#~char",
"name": "email~#~char",
"status": "status~#~char",
"customproperty1": "email~#~char",
"customproperty2": "status~#~char",
"customproperty3": "memberOf~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"Role": {
"listPath": "",
"idPath": "role",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Role": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "<endpoint_url>config/authorization/roles",
"httpHeaders": {
"x-api-key": "<api_key>",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpParams": {},
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "name~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "name~#~char",
"customproperty2": "description~#~char"
},
"makeProcessingStatus": false,
"disableDeletedEntitlements": "true"
}
}
}
}
},
"acctEntParams": {
"entTypes": {
"Role": {
"call": {
"call1": {
"processingType": "acctToEntMapping"
}
}
}
}
}
}
Solved! Go to Solution.
06/06/2023 03:54 AM
Hello @navneetv,
The "idPath" is primarily utilized for mapping purposes.
Please use the below sample and modify your json accordingly,
{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "@@BASEURL@@/admin/v1/Users",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "Resources",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "userName~#~char",
"displayname": "displayName~#~char",
"status": "active~#~char"
}
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Group": {
"entTypeOrder": 0,
"call": {
"call1": {
"connection": "userAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "@@BASEURL@@/admin/v1/Groups?attributes=members,displayName",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "Resources",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "displayName~#~char",
"acctEntMappingInfoColumnFromEnt": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"listField": "",
"idPath": "account_id",
"keyField": "accountID",
"importAsAccount": false
}
}
}
},
"acctEntParams": {
"entTypes": {
"Group": {
"call": {
"call1": {
"processingType": "http",
"connection": "userAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "@@BASEURL@@/api/now/table/sys_user_has_role",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "Memberships",
"acctIdPath": "Account_id",
"entIdPath": "Group_id",
"entKeyField": "entitlementID",
"acctKeyField": "accountID"
}
}
}
}
}
For Ref:-
https://docs.saviyntcloud.com/bundle/REST-v2021x/page/Content/Developers-Handbook.htm
06/06/2023 05:57 AM
Hi Sudesh,
The end system has only two APIs for the local role and user. One for the user and the other for the role. could you please advise or help to map the entitlement with user's account?
Role API
User API
I am able to extract the Account and Role however the role is not mapped with the account. i am assuming there can be two issue which i am not sure how to fix.
1. idPath not sure, what i need to enter
2. Member of the attribute (above user API)is not populated in the account pram. i tried to map with CP3 but it was not populated. Just because it has a [ ] symbol. I entered in json "customproperty2": "memberof~#~char"," but the value is not populated
06/06/2023 11:03 PM
Hi Team,
can someone please help/advise?
06/07/2023 05:19 AM
Hi Everyone,
can someone advise or help? i tried with all way but am unable to map the entitlement with account
06/07/2023 08:54 PM
Hello @navneetv,
Could you please try with the below JSON,
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"inactivateAccountsNotInFile": false,
"accountThresholdValue": 20
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "<endpoint_url>config/authorization/users",
"httpHeaders": {
"x-api-key": "<API_key>",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpParams": {},
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "email~#~char",
"name": "email~#~char",
"status": "status~#~char",
"customproperty1": "email~#~char",
"customproperty2": "status~#~char",
"customproperty3": "memberOf~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"Role": {
"listPath": "memberOf",
"idPath": "",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Role": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "<endpoint_url>config/authorization/roles",
"httpHeaders": {
"x-api-key": "<api_key>",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpParams": {},
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "name~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "name~#~char",
"customproperty2": "description~#~char"
},
"makeProcessingStatus": false,
"disableDeletedEntitlements": "true"
}
}
}
}
},
"acctEntParams": {
"entTypes": {
"Role": {
"call": {
"call1": {
"processingType": "acctToEntMapping"
}
}
}
}
}
}
Thanks,