We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Servicenow Rest - Remove Access is not working

poonammhetre
New Contributor II
New Contributor II

Hello,

We are using  default json file provided by Saviynt for Remove Access in Servicenow. We are getting the following error:

Call response: {"error":{"detail":"Record doesn't exist or ACL restricts the record retrieval","message":"No Record found"},"status":"failure"}

 

I have also checked that uuid values are not getting populated for accont_entitlements1 table. Could you please let me know what could be the issue and how to fix?

Thanks,

Poonam

6 REPLIES 6

SumathiSomala
All-Star
All-Star

@poonammhetre Record doesn't exist or ACL restricts the record retrieval

Commonly this error occurs when username used in the connectionjson doesnot have sufficient privileges to perform the remove access operation.

Please check it once

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

poonammhetre
New Contributor II
New Contributor II

Hi @SumathiSomala  service account has sufficient permissions to remove the access. Issue is that UUID is not getting populated during import. In remove access url we areusing below url and since it is not getting uuid it is passing null value to the url and hence it is not able to find the record.

"url": "https://removed.service-now.com/api/now/table/sys_user_has_role/${account_entitlements.uuid }",

Do you know why UUID values are not getting populated during import?

Thanks,

Poonam

[This message has been edited by moderator to mask url]

can you share import json


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

@poonammhetre Is your issue resolved?

 

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

poonammhetre
New Contributor II
New Contributor II

Hi @rushikeshvartak 

Please find below import JSON.

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxxxxxxxxxxxxxxxxxxxx/api/now/table/sys_user?sysparm_limit=100&sysparm_display_value=all",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"httpMethod": "GET"
},
"statusConfig": {
"active": "true",
"inactive": "false"
},
"listField": "result",
"keyField": "accountID",
"colsToPropsMap": {
"customproperty1": "u_primary_workgroup.display_value~#~char",
"customproperty2": "last_name.value~#~char",
"customproperty3": "name.value~#~char",
"customproperty4": "first_name.value~#~char",
"customproperty5": "department.value~#~char",
"customproperty6": "location.display_value~#~char",
"customproperty7": "email.value~#~char",
"customproperty8": "manager.display_value~#~char",
"customproperty9": "u_reports_to.display_value~#~char",
"customproperty10": "phone.value~#~char",
"customproperty11": "title.value~#~char",
"customproperty12": "u_section.value~#~char",
"customproperty13": "u_branch.value~#~char",
"customproperty14": "u_termination_date.value~#~char",
"customproperty15": "u_preferred_name.value~#~char",
"customproperty16": "mobile_phone.value~#~char",
"customproperty17": "company.display_value~#~char",
"customproperty18": "u_directorate.value~#~char",
"customproperty19": "u_position_number.display_value~#~char",
"customproperty20": "join_date.value~#~char",
"customproperty21": "employeeNumber.value~#~char",
"customproperty22": "u_person_category_code.value~#~char",
"customproperty23": "u_person_category.value~#~char",
"customproperty24": "u_responsibility_centre.display_value~#~char",
"customproperty25": "u_request_approver.display_value~#~char",
"customproperty26": "u_sub_section.value~#~char",
"name": "user_name.value~#~char",
"status": "active.value~#~char",
"accountID": "sys_id.value~#~char",
"lastlogondate": "last_login.value~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(';')?.size()==5?headers?.Link?.split(';')[2]?.replace('rel=\"prev\",<', '')?.replace('>','')?.trim():headers?.Link?.split(';')?.size()==4 && headers?.Link?.split(';')[2].contains('rel=\"next\",<')?headers?.Link?.split(';')[1]?.replace('rel=\"first\",<', '')?.replace('>','')?.trim():null}"
},
"makeProcessingStatus": true,
"disableDeletedEntitlements": true
}
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Group": {
"entTypeOrder": 0,
"entTypeLabels": {},
"call": {
"call1": {
"connection": "userAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://xxxxxxxxxxxxxxxxxxxxxx/api/now/table/sys_user_group",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"statusConfig": {
"active": "true",
"inactive": "false"
},
"listField": "result",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "sys_id~#~char",
"description": "description~#~char",
"entitlement_value": "name~#~char",
"displayname": "name~#~char",
"status": "active~#~char",
"updatedate": "sys_updated_on~#~char"
}
}
},
"entMappings": {
"Group": {
"listPath": "parent",
"idPath": "value",
"idColumn": "entitlementID",
"mappingTypes": [
"ENTMAP"
]
}
}
},
"Roles": {
"entTypeOrder": 1,
"entTypeLabels": {},
"call": {
"call1": {
"connection": "userAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://xxxxxxxxxxxxxxxxxxxxxx/api/now/table/sys_user_role",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "result",
"keyField": "entitlementID",
"colsToPropsMap": {
"description": "description~#~char",
"customproperty3": "elevated_privilege~#~char",
"entitlementID": "sys_id~#~char",
"entitlement_Value": "name~#~char",
"displayname": "sys_name~#~char"
}
}
}
}
}
},
"entMappingParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"ent1KeyField": "entitlementID",
"call": {
"call1": {
"connection": "userAuth",
"processingType": "http",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://xxxxxxxxxxxxxxxxxxxxxx/api/now/table/sys_group_has_role?sysparm_limit=1000",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "result",
"ent1IdPath": "group.value",
"ent2IdPath": "role.value",
"ent2KeyField": "entitlementID",
"targetEntType": "Roles",
"mappingTypes": [
"ENT2"
],
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(';')?.size()==5?headers?.Link?.split(';')[2]?.replace('rel=\"prev\",<', '')?.replace('>','')?.trim():headers?.Link?.split(';')?.size()==4 && headers?.Link?.split(';')[2].contains('rel=\"next\",<')?headers?.Link?.split(';')[1]?.replace('rel=\"first\",<', '')?.replace('>','')?.trim():null}"
}
}
}
}
}
}
},
"acctEntParams": {
"entTypes": {
"Group": {
"acctKeyField": "accountID",
"entKeyField": "entitlementID",
"call": {
"call1": {
"connection": "userAuth",
"processingType": "http",
"http": {
"url": "https://xxxxxxxxxxxxxxxxxxxxxx/api/now/v1/table/sys_user_grmember?sysparm_limit=10000",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
}
},
"listField": "result",
"acctKeyField": "accountID",
"entKeyField": "entitlementID",
"acctIdPath": "user.value",
"entIdPath": "group.value",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(';')?.size()==5?headers?.Link?.split(';')[2]?.replace('rel=\"prev\",<', '')?.replace('>','')?.trim():headers?.Link?.split(';')?.size()==4 && headers?.Link?.split(';')[2].contains('rel=\"next\",<')?headers?.Link?.split(';')[1]?.replace('rel=\"first\",<', '')?.replace('>','')?.trim():null}"
}
}
}
}
},
"Roles": {
"call": {
"call1": {
"connection": "userAuth",
"processingType": "http",
"http": {
"url": "https://xxxxxxxxxxxxxxxxxxxxxx/api/now/table/sys_user_has_role?sysparm_limit=10000",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
}
},
"listField": "result",
"acctKeyField": "accountID",
"entKeyField": "entitlementID",
"acctIdPath": "user.value",
"entIdPath": "role.value",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(';')?.size()==5?headers?.Link?.split(';')[2]?.replace('rel=\"prev\",<', '')?.replace('>','')?.trim():headers?.Link?.split(';')?.size()==4 && headers?.Link?.split(';')[2].contains('rel=\"next\",<')?headers?.Link?.split(';')[1]?.replace('rel=\"first\",<', '')?.replace('>','')?.trim():null}"
}
}
}
}
}
}
}
}

 

Thanks,

Poonam

Did you check below url in postman what value /param is expected for API ?

https://removed.service-now.com/api/now/table/sys_user_has_role/${account_entitlements.uuid }


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.