Skip to main content
Answer

How to escape special characters in OData Indicium request?

  • December 13, 2022
  • 1 reply
  • 235 views

Forum|alt.badge.img

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?

Best answer by Vincent Doppenberg

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.

This topic has been closed for replies.

1 reply

Forum|alt.badge.img+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.