Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Rest APIs ADD/Remove Json are failing

GPS
Regular Contributor
Regular Contributor
We are facing an issue with Add/Remove access if the entitlement has a dash(-) or space in the entitlement value/entitlement ID.
 
NOT Working entitlements:
Accounting - Admin
Accounting - Analyst
Accounts Receivable

Working entitlements:
Administrator
Credit
Debugger


Error log:
DEBUG-Got null response statusCode with erroMsg - [error:Error Illegal character in query at index 182: https://removed.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/AddEntitlementToUser?userN... Receivable]

DEBUG-Got null response statusCode with erroMsg - [error:Error Illegal character in query at index 184: https://removed.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/AddEntitlementToUser?userN... - Associate]

[This message has been edited by moderator to mask URL hyperlink]

3 REPLIES 3

stalluri
Valued Contributor II
Valued Contributor II

Hello @GPS ,

Could you try this below Config?
We need to replace those characters when passing the data. 

${encodeURIComponent(entitlementValue.entitlementID)}
${org.apache.commons.lang.StringEscapeUtils.escapeJava(entitlementValue.entitlementID)}
${URLEncoder.encode(entitlementValue.entitlementID, \"UTF-8\").replace(\"+\", \"%20\")}   
${entitlementValue.entitlementID.replace(" ", "%20")} 

 


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

NM
Esteemed Contributor
Esteemed Contributor

Hi @GPS is it working fine from postaman?

It it is related to space use %20

Sample

${entitlementValue.entitlementID.replace('','%20')


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

rushikeshvartak
All-Star
All-Star

Refer 

https://forums.saviynt.com/t5/identity-governance/url-encode-for-entitlementvalue-entitlement-value/...

 

Your solution


https://XXXXXXX/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/AddEntitlementToUser?usergroup..., 'UTF-8').replace('+', '%20')}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.