Group functions pattern

The Groups.contains , Groups.startsWith , and Groups.endsWith functions all use a “pattern” parameter.

contains(app_type/app_instance_id, pattern, limit)

What type of pattern is this? Seems to work fine with single strings but what if I want to match for multiple strings, or a wildcard match everything? Tried using regex here but does not seem to work.

Where are you trying to use a Group Function?

If you are trying to create a custom claim on a custom Authorization Server that contains groups, you can use regex if you choose to use a Groups filter instead of an Expression:

Hi @PWAH

At the moment, only strings work in the group expression for pattern attribute.

what is the app_instance_id , can be passed here ?

This would be the variable/instance name for the application in question.

For example, if you are looking to get ALL AD groups to match your expression, you can use “active_directory” as that argument, giving you an expression similar to the following: Groups.startsWith("active_directory","",100)

You can always find the specific instance for a directory integration in Profile Editor: