Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/05/2024 01:39 AM
Hi,
For Rest application which is accepting Xml , access mapping is not working.
getting below response from API for account recon.
<?xml version="1.0" encoding="UTF-8"?>
<provisionUser>
<FailureCode>0</FailureCode>
<FailureMessage>Success</FailureMessage>
<ResponseData>
<Appusers>
<user>1050</user>
<approles>
<role>StandardParts-Viewer</role>
<role>FR LR</role>
</approles>
</Appusers>
<Appusers>
<user>rpdmm</user>
<approles>
<role>Confidential - Generator</role>
<role>Confidential - Steam</role>
</approles>
</Appusers>
</ResponseData>
</provisionUser>
Using below accountentimportjson:
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountsNotInImportAction": "Suspend",
"inactivateAccountsNotInFile": false
},
"includeExistingInActiveAccounts":"true",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://@host/resources/POWER/IdmConnector,
"httpParams": "<provisionUser><operationName>getActiveUserListWithRoles</operationName></provisionUser>",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/xml"
},
"httpContentType": "application/xml",
"Accept": "application/xml",
"httpMethod": "POST"
},
"listField": "provisionUser.ResponseData.Appusers",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "user~#~char",
"name": "user~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"makeProcessingStatus": false
}
},
"acctEntMappings": {
"Access-Role": {
"listPath": "provisionUser.ResponseData.Appusers.approles",
"idPath": "role",
"keyField": "entitlement_value"
}
}
},
"entitlementParams": {}
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
09/10/2024 02:47 AM
Hi @sudheera
Could you please provide more information about the target application, have you referred the REST connector documentation and created the JSONs as per the postman calls. What is the error you are getting in the logs?
Regards,
Dhruv Sharma
09/10/2024 03:18 AM
Hi,
Yes, it is working in postman. In saviynt also it had imported accounts but when running access import it is not mapping the account entitlements.
The entitlements are showing in a list in result. How to map comma seperated entitlements to the account.
"2024-09-10T10:09:38.138+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-3-gx5p7","ERROR","Invalid record not processed for Access-Role: [approles:[role:[StandardParts-Viewer, Viewer, Shared-Viewer, New Nuclear Business-Viewer]], user:208012036]"
"2024-09-10T10:09:38.138+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-3-gx5p7","ERROR","Exception in persistObjects :"
09/10/2024 03:17 AM
@sudheera 2 things
1) remove the slash from entitlement type name just keep Access role
2)I don't see entitlement been imported did you create it manually?
And share your customproperty 31 once.
09/10/2024 03:21 AM
Yes, I have manual entitlement import.
In result it is showing in list as below.
"2024-09-10T10:09:38.138+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-3-gx5p7","ERROR","Invalid record not processed for Access-Role: [approles:[role:[StandardParts-Viewer, Viewer, Shared-Viewer, New Nuclear Business-Viewer]], user:208012036]"
"2024-09-10T10:09:38.138+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-3-gx5p7","ERROR","Exception in persistObjects :"
09/10/2024 03:25 AM
@sudheera try this
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountsNotInImportAction": "Suspend",
"inactivateAccountsNotInFile": false
},
"includeExistingInActiveAccounts":"true",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://@host/resources/POWER/IdmConnector,
"httpParams": "<provisionUser><operationName>getActiveUserListWithRoles</operationName></provisionUser>",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/xml"
},
"httpContentType": "application/xml",
"Accept": "application/xml",
"httpMethod": "POST"
},
"listField": "provisionUser.ResponseData.Appusers",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "user~#~char",
"name": "user~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"makeProcessingStatus": false
}
},
"acctEntMappings": {
"Access-Role": {
"listPath": "approles",
"idPath": "role",
"keyField": "entitlement_value"
}
}
},
"entitlementParams": {}
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
09/10/2024 03:33 AM
it is showing same error as above.
How to map the comma separated entitlement list from result, for account.
09/10/2024 04:32 AM
@sudheera Share cp31 and also share entitlement name
09/10/2024 05:58 AM
cp31 is showing like below
and entitlements are as below:
09/10/2024 06:03 AM
Hi @sudheera does the person have account on target end?
Check if cp31 is empty for all the accounts
09/10/2024 06:17 AM
does the person have account on target end? --Yes
Check if cp31 is empty for all the accounts __yes , it is same for all accounts
09/10/2024 06:08 AM
Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️
09/10/2024 06:20 AM - last edited on 09/10/2024 06:31 AM by Sunil
[This message has been edited by moderator to mask sensitive information]
09/10/2024 06:28 AM
Use below Sample
"customproperty31": "#CONST#${String output1=response.userlist.groups.replaceAll('[\\[\\]]', '').replaceAll(', ', '\",\"'); beg= '{\"Group\":{\"entIds\":[\"'; end= '\"],\"keyField\":\"entitlementID\"}}'; output2= beg.concat(output1); finoutput= output2.concat(end); return finoutput}~#~char"
09/10/2024 07:35 AM
I have updated as per the xml result:
"CUSTOMPROPERTY31": "#CONST#${String output1=provisionUser.ResponseData.Appusers.approles.role.replaceAll('[\\[\\]]', '').replaceAll(', ', '\",\"'); beg= '{\"Group\":{\"entIds\":[\"'; end= '\"],\"keyField\":\"entitlement_value\"}}'; output2= beg.concat(output1); finoutput= output2.concat(end); return finoutput}~#~char"
could you please check cp31 is in format? (shared postman result)
but got below error:
"ERROR","Invalid record not processed for Access-Role: [approles:[role:[SE LR, Confidential - Gas, Confidential - Steam, Change Coordinator, Confidential - Generator, GEMFAExcludeUser]], user:plmstq]"
"ERROR","Exception in persistObjects :"
"2024-09-10T14:27:10.506+00:00","ecm-worker","","null-2tjzr","","java.lang.NullPointerException: Cannot invoke method getAt() on null object
09/10/2024 08:45 AM
#CONST#${String output1=provisionUser.ResponseData.Appusers.collect { it.approles.role }.flatten().collect { it.replaceAll('"', '\\"') }.join('","'); '{"Group":{"entIds":["'.concat(output1).concat('"],"keyField":"entitlement_value"}}')}
09/10/2024 09:07 AM
Hi ,
Showing below error:
tried the given one and below also:
"#CONST#${String output1=provisionUser.ResponseData.Appusers.collect { it.approles.role }.flatten().collect { it.replaceAll('"', '\\"') }.join('","'); beg= '{"Group":{"entIds":["'.concat(output1).concat('"],"keyField":"entitlement_value"}}'); return beg}~#~char"
09/10/2024 09:18 AM
Share full json
09/11/2024 04:32 AM
Please find below:
09/11/2024 05:09 AM
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountsNotInImportAction": "Suspend",
"inactivateAccountsNotInFile": false,
"accountThresholdValue": 1000
},
"includeExistingInActiveAccounts": "true",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://qa-hostresources/POWERPLmConnectorService",
"httpParams": "<provisionUser><operationName>getActiveUserListWithRoles</operationName></provisionUser>",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/xml"
},
"httpContentType": "application/xml",
"httpMethod": "POST"
},
"listField": "provisionUser.ResponseData.Appusers",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "user~#~char",
"name": "user~#~char",
"CUSTOMPROPERTY31": "#CONST#${String output1 = provisionUser.ResponseData.Appusers.collect { it.approles.role }.flatten().collect { it.replaceAll('\"', '\\\"') }.join('\",\"'); beg = '{\"Group\":{\"entIds\":[\"'.concat(output1).concat('\"]],\"keyField\":\"entitlement_value\"}}'); return beg;}~#~char"
}
}
},
"acctEntMappings": {
"Access-Role": {
"listPath": "approles",
"idPath": "role",
"keyField": "entitlement_value"
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Access-Role": {
"entTypeOrder": 1,
"entTypeLabels": {},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://qa-host/resources/POWEe/IdmConnectorService",
"httpParams": "<provisionUser><operationName>getActiveUserListWithRoles</operationName></provisionUser>",
"httpContentType": "application/xml",
"httpMethod": "POST"
},
"listField": "provisionUser.ResponseData.Appusers",
"keyField": "entitlement_value",
"colsToPropsMap": {
"entitlement_Value": "role~#~char"
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
09/11/2024 05:23 AM
it is showing same error, not mapping ent.
showing the below error for each user.
ERROR-Invalid record not processed for Access-Role: [approles:[role:[Confidential - Generator, Design Engineer, Special Attention Required, Change Coordinator, NX Designer, AutoCAD Designer, StandardParts-Viewer, Confidential - Steam, US LR]], user:pltta]
ERROR-Exception in persistObjects :
09/17/2024 07:20 AM
please let me know if anyone has any solution for this.
09/17/2024 10:29 AM
Please raise support ticket with saviynt ops