Thursday, May 25, 2017

ADFS : The case of the slanting quote

I don't know the official name of this character but it's the double quote sign that slants to the right.

There was a question on the forum about a claims rule that threw "POLICY0002: Could not parse policy data" when the user tried to save it.

It looked like:

c:[Type == "http://adatum.com/data1holder", Issuer == "AD AUTHORITY"]
 => issue(type = "http://adatum.com/data1", Value = RegExReplace(c.Value,”'”,””);

The problem was the slanting quotes in the RegExReplace.

Using the double quote key (") on the keyboard and replacing these gives:

c:[Type == "http://adatum.com/data1holder", Issuer == "AD AUTHORITY"]
 => issue(type = "http://adatum.com/data1", Value = RegExReplace(c.Value,"'","");

which parses no problem.

Enjoy!

No comments: