Skip to main content
Solved

How to escape special characters in OData Indicium request?

  • December 13, 2022
  • 1 reply
  • 207 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.

View original
Did this topic help you find an answer to your question?
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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings