Skip to content

OP-018: Project an AD principal into a SaifUser, resolving the manager's user id

GetSaifUserByUserId 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.

Field Value
Operation ID OP-018
Trigger Caller invokes GetSaifUserByUserId over the Security route.
Entry operation GetSaifUserByUserId
Owning component SAIF.Services.WCF.Services.Security.SecurityService.GetSaifUserByUserId
Inputs Request message parts listed below
Outputs An AD-projected SaifUser with department, employee id, manager, job title, desk location, and primary fax.
Failure behavior Generic SOAP fault, per Faults and error pipeline

Request and response

Direction Element Type Declared in Notes
Request userId string BCL (System) AD account identifier to project as a SaifUser. (Yes)
Response SaifUser SaifUser External contracts assembly (SAIF.Services.WCF.Contracts / framework closure) ** An AD-projected SaifUser with department, employee id, manager, job title, desk location, and primary fax.

Steps

  1. LogRequestDetails logs the operation name and arguments (BR-WCF-032).
  2. TryGetSaifUser calls SaifUserPrincipal.FindByIdentity on domain SAIF; a null principal returns null; otherwise the AD-only fields Department, EmployeeId, ManagerName, ManagerUserId, JobTitle, desk location, and primary fax are copied onto the projected SaifUser (BR-WCF-025a).
  3. ManagerUserId performs a second directory lookup by the manager's common name, returning empty when the manager name is blank (BR-WCF-024a).
  4. Return.
  5. On failure: a directory exception is logged by the installed error handler and surfaced as a generic SOAP fault with exception detail included.

Process flow

The following diagram visualizes this process's control flow.

flowchart TD
    A["Log request details"]
    B["TryGetSaifUser calls SaifUserPrincipal.FindByIdentity on<br>domain SAIF"]
    B1{"Principal found?"}
    B2["Null principal: return null"]
    B3["Copy AD-only fields onto<br>projected SaifUser"]
    C["Resolve manager's user id<br>via second directory lookup"]
    D["Return."]
    A --> B
    B --> B1
    B1 -->|"No"| B2
    B1 -->|"Yes"| B3
    B2 --> D
    B3 --> C
    C --> D

Transaction and side effects

Aspect Finding
Unit of work OracleUnitOfWorkFactory (EXTUR), opened but not used for this path
Commit point Not applicable
Records written None
Downstream calls Active Directory (SAIF domain, up to two lookups)
Shared state touched None
Repeat-call behavior Idempotent read

Logging

Surface Written content
HttpContext.Current.Response.AppendToLog (LogRequestDetails) Writes IIS request-detail log lines when LOG_REQUEST_DETAILS is enabled
ErrorLogErrorHandler → LogService Failure-path exception logging only, carrying method signature, calling user and exception detail; see Faults and error pipeline

Faults and error handling

Failure Fault type the caller receives Produced by Source
Directory exception Generic SOAP fault The ErrorLogErrorHandler installed by [LogErrorBehavior] src/WCF/SAIF.Services.WCF.Host/Services/Security/Users/UserFactory.cs

Authorization

Requirement Enforced by Source Applies to
None in code IIS authentication on the deployment (see Activation and hosting) src/WCF/SAIF.Services.WCF.Host/Services/Security/SecurityService.cs This operation

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.

Sources

  • src/WCF/SAIF.Services.WCF.Host/Services/Security/SecurityService.cs
  • src/WCF/SAIF.Services.WCF.Host/Services/Security/Users/UserFactory.cs