---
title: "SQL-025: System user e-mail lookup"
summary: Look up a system user's e-mail address.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-31
library: SAIF.Business.View.Policy
reference_type: package
---

# SQL-025: System user e-mail lookup

`clsTeamAssignment` uses this call to resolve a system user's e-mail address from the contractor directory, matching on the mail identifier and last name. It is the current replacement for the legacy external-client lookup.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-025 |
| **Operation type** | Read |
| **Execution method** | Stored procedure |
| **Database** | Oracle |
| **Schema** | `[unqualified]`** |
| **Command type** | StoredProcedure |
| **Business object** | `clsTeamAssignment` |
| **Criteria property** | `GetExternalEmailAddress` |
| **Lifecycle method** | `InitializeEmailAddressUsingSystemUser` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:in_mailid` | Input | String | 30 | Trimmed system-user mail identifier to match. |
| `:in_last_name` | Input | String | 65 | Last name to match alongside the mail identifier. |
| `:out_external_email` | ReturnValue | String | 100 | Resolved e-mail address from `system_user_contractor`, or null when no row matches. |

## Tables

No table is referenced directly in the .NET source. The tables read by the procedure body reside in the Oracle database and are described under [sp73341_external_client_lookup](../procedures/sp73341_external_client_lookup.md).

## Sample SQL

```sql
-- Stored procedure call (procedure body resides in the Oracle database - WCIS_DBA)
CALL sp73341_external_client_lookup(
  in_mailid          => :in_mailid,
  in_last_name       => :in_last_name,
  out_external_email => :out_external_email)  -- return-value output parameter
```

## Operations and processes

- [Retrieve supporting policy aggregates](../operations/retrieve-supporting-policy-aggregates.md)

> **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

- `Business/SAIF.Business.View.Policy/clsTeamAssignment.vb`
