---
title: Acquire navigation data
summary: Obtain the signed-in user's authorised menu items, loading them once per session.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2.Menu
reference_type: package
operation_id: OP-MENU-001
trigger: First access to `NavigationData` in a control's page lifecycle within a given ASP.NET session.
---

# Acquire navigation data

Obtain the signed-in user's authorised menu items, loading them once per session. This operation is implemented by `SAIFMenu.GetNavigationData` / `SAIFMenuTop.GetNavigationData`.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-MENU-001 |
| **Trigger** | First access to `NavigationData` in a control's page lifecycle within a given ASP.NET session. |
| **Inputs** | Windows logon identity (`Request.LogonUserIdentity.Name`); `Session("navdata")`. |
| **Outputs** | A `NavigationContext` holding the user's authorised menu items, cached in session. |
| **Primary components** | `SAIFMenu.GetNavigationData` / `SAIFMenuTop.GetNavigationData` |
| **Entry point** | `SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb` |

## Steps

1. If the control is in design mode, return `Nothing` without touching session or the database. Enforces [BR-MENU-001](../business-rules.md#br-menu-001-no-navigation-data-is-loaded-at-design-time).
2. If `Session("navdata")` holds a `NavigationContext`, return it. Enforces [BR-MENU-002](../business-rules.md#br-menu-002-navigation-data-is-cached-once-per-session).
3. Otherwise read `HttpContext.Current.Request.LogonUserIdentity.Name`, strip the domain prefix, trim and upper-case it. Enforces [BR-MENU-003](../business-rules.md#br-menu-003-the-menu-user-id-is-the-normalized-windows-logon-identity).
4. Construct `New NavigationContext(userid)` and store it in `Session("navdata")`. Enforces [BR-MENU-004](../business-rules.md#br-menu-004-menu-content-is-scoped-to-the-signed-in-users-authorised-items).
   - Delegates to `NavigationContext` in `SAIF.Presentation.Web.MVC`, whose constructor opens an Oracle data layer as DB user `MENU` and loads the user's authorised menu items — this happens inside that component, not here.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start(["First access to NavigationData in a control's page life cycle"]) --> Design{Design mode?}
	Design -->|Yes| Nothing(["Return Nothing"])
	Design -->|No| Cached{"Session(&quot;navdata&quot;) cached?"}
	Cached -->|Yes| ReturnCached(["Return cached NavigationContext"])
	Cached -->|No| Identity["Read LogonUserIdentity, strip domain, trim/upper-case"]
	Identity --> Construct["New NavigationContext(userid)"]
	Construct --> Store["Store in Session(&quot;navdata&quot;)"]
	Store --> End(["NavigationContext with authorised items"])
```

## Failure and edge-case behavior

- Design mode: no data acquired, no exception ([BR-MENU-001](../business-rules.md#br-menu-001-no-navigation-data-is-loaded-at-design-time)).
- No cached session data and identity not `DOMAIN\user` form: `userid` is derived directly from `LogonUserIdentity.Name`, which is not validated for format here.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Database tables](../database-tables.md)

## Sources
- `SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb`
