
cpj24 (cpj24) asked a question.
I would like to configure a rule that populates a group based on the Active Directory Organizational unit of an AD mastered user account. I have found the String.stringContains function for Okta Expressions, and when I use raw strings it works properly. However, when I attempt to reference the AD OU field, I always receive an error that "Unsupported expression constructs are used in expression String.stringContains(<fieldindicator>,"<data>")."
This occurs with any of the below structures
String.stringContains(active_directory.dn,"<data>")
String.stringContains(ad.dn,"<data>")
String.stringContains(app.dn,"<data>")
String.stringContains(active_directoryuser.dn"<data>")
String.stringContains(aduser.dn,"<data>")
String.stringContains(appuser.dn,"<data>")
The same is the case if I fully spell out distinguishedname or distinguished_name.
I have also tried creating a new custom attribute in Okta called addn and mapping the active_directory.dn to it. The mapping appears to be correct, but the new attribute is not populating. That is the case with both an incremental and a full import.

I opened a ticket with Okta support. They had me recreate the mapping and it started populating existing users with the data. It is unclear why the original mapping did not update existing users.
The technician also confirmed that it is not possible to reference application or directory data in the expression editor for group rules. It is only possible to reference Okta managed data.