
MikeD.47455 (Customer) asked a question.
We are mastering our users directly in Okta's directory. However, in the shorter term, we still have a need to push user information to Active Directory. This includes needing to update the details in AD, based on information changed in Okta.
- Currently, we have a managerId field, which stores the Okta username of the manager as a string. Is it best practice to stick with this, or should we be using a linked object to refer to the manager?
- The Okta username of the manager is not necessarily the same as the manager's UPN in AD. We would therefore need to query the manager's Okta user object, in order to get the relevant AD attribute to send over to AD for the employee. Is there an Okta expression we can use for this? E.g.:
- If we store the manager's Okta username, can we pass that username to find the manager's Okta user object, and look up the 'active_directory.dn' for that user?
- If we have the manager as a linked user, can we get app attributes for the linked user? 'user.getLinkedObject("managerUser").email' works, but 'user.getLinkedObject("managerUser").active_directory.dn' doesn't.
Note that I don't want to read information from Active Directory. Everything needs to be sourced from Okta.

Hi @MikeD.47455 (Customer) , Thank you for reaching out to the Okta Community!
I haven’t implemented this kind of integration myself but this is discussed in this article.
I assume you’ve looked into this as well, but I wanted to clarify that when you using the “user.getLinkedObject” expression you have to reference an attribute that exists in object’s Okta User profile. As such, in your case “active_directory.dn” is not a valid attribute. You will need to create and populate a custom attribute on the Okta User profile with the required values.
If my answer helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you.
Hope my answer helps!
--------------------------------
Ask Away: OIG Product Experts Answer Your Questions Thru Thur., Dec 14