Expressions
You can use expressions to concatenate attributes, manipulate strings, convert data types, and more. Expressions let you construct values that you can use to look up users.
An expression is a combination of:
- Variables: These are the elements found in your Okta user profile, including certificate attributes used when you create a smart card Identity Provider.. For example, idpuser.subjectAltNameUpn, idpuser.subjectAltNameEmail, and so on. See Add a Smart Card Identity Provider.
- Operations: Use these to concatenate or perform other operations on variables. For example, the "+" operation concatenates two objects.
- Functions: Use these to modify or manipulate variables to achieve a desired result. For example, String.toUpperCase converts the input to uppercase. See Functions for a complete list of available functions.
The following table provides example expressions:
Description | Example |
---|---|
Select all content before the @ character. | String.substringBefore(idpuser.subjectAltNameEmail, "@") |
Select the last 20 characters of the provided field. | String.substring(idpuser.subjectCn, String.len(idpuser.subjectCn)-20, String.len(idpuser.subjectCn)) |
Select all content before the @ character and transform to lower case. | String.toLowerCase(String.substringBefore(idpuser.subjectAltNameUpn, "@")) |
If the selected field contains the @ character, return all content before it; otherwise return the entire field. |
String.stringContains(idpuser.subjectAltNameEmail, "@") ? String.substringBefore(idpuser.subjectAltNameEmail, "@") : idpuser.subjectAltNameEmail |