Click HERE to see how Saviynt Intelligence is transforming the industry. |
11/05/2024 02:24 AM
Hi Team,
Currently we are using RemoveAccessJson for ServiceNow provided on Saviynt Documentation
We are trying to remove the role for the user
We are getting below error when provisioning job is executed.
Call response: {"error":{"detail":"Record doesn't exist or ACL restricts the record retrieval","message":"No Record found"},"status":"failure"}
Json -
{
"call": [{
"name": "Group",
"connection": "userAuth",
"url": "https://<hostname>.service-now.com/api/now/v1/table/sys_user_grmember?user=${account.accountID}",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [200]
},
"unsuccessResponses": {
"statusCode": [403]
}
}, {
"name": "Group",
"connection": "userAuth",
"url": "https://<hostname>.service-now.com/api/now/v1/table/sys_user_grmember/${for (Map map : response.Group1.message.result){if (map.group.value.toString().equals(entitlementValue.entitlementID)){return map.sys_id;}}}",
"httpMethod": "DELETE",
"httpHeaders": {
"Authorization": "${access_token}" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [204]
},
"unsuccessResponses": {
"statusCode": [403]
}
}, {
"name": "Roles",
"connection": "userAuth",
"url": "https://<hostname>.service-now.com/api/now/v1/table/sys_user_has_role/${account_entitlements.uuid}",
"httpMethod": "DELETE",
"httpHeaders": {
"Authorization": "${access_token}" },
"httpContentType": "application/json" }]
}
I checked accounts_entitlements1 uuid is not getting populated during import, has anyone faced similar issue before?
Any help would be appreciated.
Thanks