---
title: Retrieve a global configuration setting
summary: Read a single global setting directly from the Environment API.
status: draft
owner: SAIF Framework
last_reviewed: 2026-07-30
library: SAIF.Framework.Security.EnvironmentApi
reference_type: package
operation_id: OP-ENV-004
trigger: Internal code requests a bootstrap setting outside the shared cache
---

# Retrieve a global configuration setting

This operation performs a direct, single-setting lookup against the Environment API's global-setting route, bypassing the shared cache entirely. The library relies on it mainly to bootstrap the LDAP and domain values it needs before it can even attempt a developer-machine authorization check, at a point where the normal cache may not yet be populated.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-ENV-004 |
| **Trigger** | Internal code requests a bootstrap global setting |
| **Inputs** | `configKey` |
| **Outputs** | Global setting value or `null` |
| **Primary components** | `EnvironmentServiceBase.GetGlobalConfigSetting` |
| **Entry point** | `SAIF.Framework.Security.EnvironmentApi\Services.Common\EnvironmentServiceBase.cs` |

## Steps

1. Build `/v2/setting/{ApplicationId}/global/{configKey}/value` using the current application identifier ([BR-002](../business-rules.md#br-002-environment-api-base-url-must-be-present)).
2. Download the JSON response with a transient `WebClient` created for this single call.
3. Deserialize the payload into one `ConfigSetting` object.
4. Return `setting.ConfigValue.Value` when a setting was returned; otherwise return `null` rather than throwing.
5. Let HTTP, serialization, or environment-variable exceptions bubble to the caller — none are handled locally.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Caller requests global setting]) --> Url[Build global-setting URL]
	Url --> Download[Download JSON payload]
	Download --> Deserialize[Deserialize ConfigSetting]
	Deserialize --> Found{Setting returned?}
	Found -->|Yes| Value([Return ConfigValue.Value])
	Found -->|No| Null([Return null])
```

## Failure and edge-case behavior

- This method bypasses the shared settings cache entirely, so it never benefits from — or contributes to — the throttled refresh used elsewhere in the library.
- A caller receives `null` when the API returns no setting object, rather than an exception.
- No exception handling occurs locally; HTTP, serialization, and configuration errors reach the caller unchanged.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Configuration](../configuration.md)

## Sources
- SAIF.Framework.Security.EnvironmentApi\Services.Common\EnvironmentServiceBase.cs
