Solved

How to escape special characters in OData Indicium request?

  • 13 December 2022
  • 1 reply
  • 160 views

Badge

I am unable to fetch users from IAM over indicium which have a special character in their name like a domain user. In such a case indicium returns: "Invalid OData URL".
An example URL:

/usr(tenant_id=1,usr_id='DOMAIN_NAME\\useraccount')


However without a special character (backslash) it does work as follows:

/usr(tenant_id=1,usr_id='IAM_USER1')


How do we escape special characters in such an OData Indicium request?

icon

Best answer by Vincent Doppenberg 13 December 2022, 15:38

View original

This topic has been closed for comments

1 reply

Userlevel 6
Badge +4

Hello Benjamin,

All characters that have a special meaning inside of a URL must be encoded when used as part of a parameter value. This encoding is called URL encoding or Percent-encoding. The backslash character can then be represented by %5C, resulting in the following URL:

/usr(tenant_id=1,usr_id='DOMAIN_NAME%5Cuseraccount')

I hope this helps.