Advanced Claim to Role Regex

I’d like to map an OIDC claim to a Realm Role.
If I use the advanced claim to role mapper with the exact
value of the clami it works as expected.

Now, I want to make it more general and use a RegEx to map multiple
claim values to this group but this does not work.
My claim is eduperson_entitlement and I would like to map any claim value of and anything that follows to this to my role.
How do I construct the RegEx?
It seems like I’m missing somethng, a simple search for \b does not work.
Does anyone have experience with this?

Did you make any progress with this?

Hi @alansonsci ,
yes, I had to match the whole of the OIDC Claim with a regex matchall
This worked. Took a while and a lot of :smiley:

1 Like

BTW did you write a script to do this or was it via the console? I am trying to learn about the REST API and trying and failing to get it working via my python script. import requestsimport jsonimport boto3# Set up variables for Keycloak se -

no I just used the Web UI.