<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Use RawUserAgent in a Custom Expression for the Authentication Policy Rule
Administration
Okta Identity Engine
Overview

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.

Applies To
  • Okta Identity Engine (OIE)
  • Authentication Policy
  • Custom Expression & Expression Language
Solution

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_Value is "Mac OS Iphone/ 54612".

expression language

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".

 

Related References

Loading
How to Use RawUserAgent in a Custom Expression for the Authentication Policy Rule