We are having issues getting the correct and non duplicated User Details where we have the same user name on multiple directories. In a nutshell, we can have user name "asmith" on directory A, and another "asmith" on directory B, which are not the same user. We want to get the user details from the [cwd_user] table, but joining on the [user_name] or [lower_user_name] (both the same) brings back duplicates.
Both directories are active ... it's not that we have migrated from one to the other, as per this post.
Also found this link that shows how to use the [app_user] table for the lookup, but it doesn't solve our problem with multiple directories.
How should we go about getting the correct user details for the [CREATOR] column on the [jiraissue] table, as well as the [AUTHOR] column on the [dbo].[changegroup] table?
Users from both directories can work on a single task. Pretty sure we just need to link the directory_id values (no user_name is duplicated within a single directory), but can't find where to look up these values. Is there no way that instead of having user_names all over the database, it can rather specify the UserId values (even if it is in the text format 'IDxxxx')?
Please help