
AlexM.67024 (Customer) asked a question.
Hello. One of our instances is AD mastered, but also have Okta-native accounts. I'm trying to create a group rule that can add AD mastered users to a group, but so far no luck.
Is there an specific attribute or expression that can match that?
Thanks

You can create a rule using Okta expression language, assuming your Okta native accounts don't have the domain name in the username.
For example:
String.substringAfter(user.login, "@") == "insertdomainname.com"
Then assign to: group name
Excellent. Thanks!
String.substringAfter(user.login, "@") == "yourdomain.com"
Another option is the hasDirectoryUser() function, which returns true for any account that is AD-mastered and false for any account that is Okta-mastered.
If user.hasDirectoryUser()
Then Assign to <AD-mastered users group>
If !user.hasDirectoryUser()
The Assign to <Okta-mastered users group>