Click HERE to see how Saviynt Intelligence is transforming the industry. |
01/16/2024 12:37 PM
Hi guys,
I am trying to import some entitlements using the an user import as I do not have an API endpoint for the entitlements directly. I have an account in the target application that will have all the entitlements assigned and I can import using that account.
I think my problem is with the response. As I am using the users endpoint I am getting a list with one user in it and then the roles is inside another list as attached at the end.
My main concern is with the list path and callstopropsmapping part. I need to get each role individually from that list.
Options tried: "roles", "0.roles", "[0].roles" and some ternary operators I found on the forum and it did not work either.
[
{
"id": 211,
"phone-mobile": null,
"country-of-residence": null,
"roles": [
{
"id": 2,
"name": "Admin",
"description": "Full system access to setup and maintain the application",
"omnipotent": true,
"system-role": true
},
{
"id": 3,
"name": "User",
"description": "Standard role for all users who need to create and/or approve requisitions",
"omnipotent": false,
"system-role": true
},
{
"id": 10003,
"name": "Act-As",
"description": "",
"omnipotent": false,
"system-role": false
}
],
"manager": null
}
]
01/16/2024 12:47 PM
Share current json
01/16/2024 12:58 PM
This is the entire JSON:
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://client-test.coupahost.com/api/users?offset=50",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"customproperty1": "email~#~char",
"name": "login~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "fullname~#~char",
"customproperty6": "company~#~char",
"customproperty8": "purchasing-user~#~char",
"customproperty9": "expense-user~#~char",
"customproperty10": "sourcing-user~#~char",
"customproperty11": "inventory-user~#~char",
"customproperty12": "contracts-user~#~char",
"customproperty13": "analytics-user~#~char",
"customproperty14": "created-by.id~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty17": "active~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://client-test.coupahost.com/api/users?id=211",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "[0].roles",
"keyField": "entitlementID",
"colsToPropsMap": {
"displayName": "name~#~char",
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
},
"disableDeletedEntitlements": true
}
}
}
}
},
"acctEntParams": {}
}
01/16/2024 02:34 PM
We also had issue with coupa refer json
https://forums.saviynt.com/t5/identity-governance/coupa-accountimport-job-is-stuck/m-p/40364
01/16/2024 03:00 PM
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty21",
"activeStatus": [
"1",
"true"
],
"deleteLinks": false,
"accountThresholdValue": 85000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": true,
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 1,
"http": {
"url": "https://${connection.hosturl}/api/users?status=active&offset=23523",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"accessToken": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"customproperty1": "email~#~char",
"name": "login~#~char",
"status": "active~#~char",
"displayname": "fullname~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "fullname~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty6": "company~#~char",
"customproperty8": "purchasing-user~#~char",
"customproperty9": "expense-user~#~char",
"customproperty10": "sourcing-user~#~char",
"customproperty11": "inventory-user~#~char",
"customproperty12": "contracts-user~#~char",
"customproperty13": "analytics-user~#~char",
"customproperty14": "created-by.id~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty20": "manager.login~#~char",
"customproperty21": "active~#~char",
"creator": "created-by.login~#~char",
"customproperty22": "login~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"User Group": {
"importAsEntitlement": false,
"listPath": "user-groups",
"idPath": "id",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"User Group": {
"entTypeOrder": 0,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 1,
"http": {
"httpHeaders": {
"accessToken": "${access_token}",
"Accept": "application/json"
},
"url": "https://${connection.hosturl}/api/user_groups",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping" }
}
01/16/2024 03:07 PM
Hi @rushikeshvartak ,
Thanks again for the reply. I am not sure how those changes are going to help me. I am getting a response but I do not know how to map it. If I leave the listPath empty I will not be referrencing something usefull either. I need my listPath to access the roles attribute in the first element of the whole list that I am getting as a response. Something similar to [0].roles in my opinion.
The example you shared with me has an endpoint specifically for that entitlement type which I do not. I have to do this via the /users endpoint which will give me a list including one element.
Thank you.
01/16/2024 03:11 PM
In that case you can loop over all accounts in call 1 and send account id to call 2 with dependentcall = true in call 2 and passing account id from response of call 1
01/17/2024 05:14 AM
I am not sure I can do that either. If I am referencing acctToEntMappings in accountParams I get the details (not in full though) in cusstomproperty31 but just the id not the name and description, but the entitlements are not getting created even if importAsEntitlement is enabled. I think it is still something with the path not being correct in retrieving the data.
01/17/2024 10:35 AM
Does your target app is coupa if yes try above working json shared
01/17/2024 10:40 AM
Hi Rushikesh,
Those endpoints do not exist. I am trying to switch my approach here. Is there a way (or do I need a new forum post) to edit the response of the API call ? I want to remove the first and last character from the whole response to get rid of the square brackets.
01/17/2024 07:50 PM
You can edit message / create new thread
01/29/2024 11:35 PM
Hi @Baver
Correct me if I am wrong - the response of the GET user API that is shared above contains the role information and you do not have a separate API to import roles, if this is the case, please use the below JSON and run both account and access recon jobs.
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://client-test.coupahost.com/api/users?offset=50",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"customproperty1": "email~#~char",
"name": "login~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "fullname~#~char",
"customproperty6": "company~#~char",
"customproperty8": "purchasing-user~#~char",
"customproperty9": "expense-user~#~char",
"customproperty10": "sourcing-user~#~char",
"customproperty11": "inventory-user~#~char",
"customproperty12": "contracts-user~#~char",
"customproperty13": "analytics-user~#~char",
"customproperty14": "created-by.id~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty17": "active~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
Thank you,
Vedanth B.K