
sogi1 (sogi1) asked a question.
okta expression language - trying to extract groups using an AND condition
Arrays.contains(access.scope, "groups-MEP-core") ? Groups.startsWith("active_directory","ldap-amw-abopayments-",100) AND Groups.endsWith("active_directory","-dev",100)

Updating this response for ease of access and reference:
Overview
This article discusses using Okta Expression Language (OEL) to extract groups using an AND condition. Specifically, it addresses attempting to filter groups that both start with and end with specific strings.
Applies To
Solution
How does Okta extract groups using multiple conditions in Okta Expression Language?
Evaluate a conditional expression that attempts to extract Active Directory (AD) groups starting with a specific prefix and ending with a specific suffix using an AND operator.
Extract groups that meet multiple conditions without a conditional statement by using the Arrays.flatten function to combine the results of the Groups.startsWith and Groups.endsWith functions.
NOTE: This expression returns a union of the groups, meaning it lists all groups that start with the first string and all groups that end with the second string. It does not return an intersection of groups that meet both conditions simultaneously.
Combine the flattened arrays using an AND operator to attempt filtering the groups further.
NOTE: This alternative expression also returns a union of the groups rather than an intersection.
Related References