OP-017: Resolve a user across Active Directory, WCIS, ADP, and external-user sources in priority order¶
GetUser is invoked over the Security route on SAIF.Services.WCF.Services.Security.SecurityService; this page documents the process end to end, from route dispatch to the message the caller receives.
LogRequestDetails logs the operation name and arguments (BR-WCF-032).
UserFactory.TryGetInternalUser(userId) opens a PrincipalContext on domain SAIF and calls UserPrincipal.FindByIdentity(context, IdentityType.SamAccountName, userId); on a hit, project via GetInternalUser (BR-WCF-026a).
On a directory miss, TryGetWcisEmployeeUser queries WcisEmployee by upper-cased id and marks the user active unless the status code is IN (BR-WCF-027a).
On a further miss, TryGetAdpUser queries Employee by user id and marks the user active only when EmployeeStatusCode == "A" (BR-WCF-028a).
Falling through all internal sources, TryGetExternalUser(userId) queries ExternalUser by upper-cased user id (BR-WCF-019a, BR-WCF-020a).
Falling through everything, GetEmptyUser(userId) returns a User with Exists = false, an empty contact, and all flags false (BR-WCF-018a).
Return.
On failure: a directory or Oracle/NHibernate exception is logged by the installed error handler and surfaced as a generic SOAP fault with exception detail included.
The following diagram visualizes this process's control flow.
flowchart TD
A["Log request details"]
B["Look up user in Active<br>Directory (SAIF domain)"]
B1{"AD hit?"}
B2["Project via GetInternalUser"]
C["Look up user in WCIS<br>employee table"]
C1{"WCIS hit?"}
D["Look up user in ADP<br>employee table"]
D1{"ADP hit?"}
E["Look up user in<br>external-user table"]
E1{"External hit?"}
F["Return non-existent user"]
G["Return."]
A --> B
B --> B1
B1 -->|"Hit"| B2
B1 -->|"Miss"| C
B2 --> G
C --> C1
C1 -->|"Hit"| G
C1 -->|"Miss"| D
D --> D1
D1 -->|"Hit"| G
D1 -->|"Miss"| E
E --> E1
E1 -->|"Hit"| G
E1 -->|"Miss"| F
F --> G
Note: Statements marked with * were inferred from code structure, naming
conventions, or contextual evidence where direct confirmation was not available
in source artifacts. Statements marked with ** could not be confirmed; treat
as unknown until verified.