You can use the Session object in workflow script to retrieve information from the user directory. For example, use Session.UserList to access information such as the user’s e-mail address or manager.
For example, in the Finding a Manager in the User Directory example, the function uses the current user’s SAM Account Name to locate the name and e-mail address of the manager for that user. The script finds the manager by first locating the user in the user directory using the SAM Account Name
ulist.Find strUL_SAM & "='" & Session.Item(strItem) & "'"
and then by identifying that user’s manager.
strManagerSID = ulist(strUL_MGR)
Once the function has located the manager, it looks up the e-mail address for that manager and returns that information.
For example script showing the functions that return user information from the user directory, see Script Examples.