This article will display the language expression that allows the admin to use the RawUserAgent parameter from the events in a custom expression for the authentication policy rule.
- Okta Identity Engine (OIE)
- Authentication Policy
- Custom Expression & Expression Language
The expression language that allows for the RawUserAgent to be used as a filter in the authentication policy rule is the following:
request.userAgent == "RawUserAgent_Value"- In the below example,
RawUserAgent_Valueis "Mac OS Iphone/ 54612".
The request.userAgent.contains is also supported since release 2025.06.1. For example, using request.userAgent.contains("Iphone") to filter user agent that contains "Iphone".
