> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/use-harness-platform/secrets/secrets-management/reference-secrets-in-custom-sm.md).

# Reference Secret in Custom Secret Manager

This topic provides a detailed explanation of guidelines on how to reference secrets within the Custom Secret Manager, including specific examples and constraints.

#### Scopes in Harness <a href="#scopes-in-harness" id="scopes-in-harness"></a>

Currently, we have three scopes: Account, Organization, and Project. These scopes are arranged in a hierarchical order:

* Account is the parent scope for Organization.
* Organization is the parent scope for Project.

This means that an Account can contain multiple Organizations, and each Organization can contain multiple Projects.

#### Reference Secrets <a href="#reference-secrets" id="reference-secrets"></a>

When referencing secrets in Harness, the following rules apply:

* **Account Scope**: Can reference secrets from its own scope.
* **Organization Scope**: Can reference secrets from both its own scope and its parent Account scope.
* **Project Scope**: Can reference secrets from its own scope, its parent Organization scope, and the Account scope.

#### Reference Secrets in Custom Secret Manager <a href="#reference-secrets-in-custom-secret-manager" id="reference-secrets-in-custom-secret-manager"></a>

When using the Custom Secret Manager, you need to specify the identifier of the secret along with the scope where it is available:

* **Account-Level Secret**: `account.secretIdentifier`
* **Organization-Level Secret**: `org.secretIdentifier`
* **Project-Level Secret**: `secretIdentifier` (No prefix is required for project-level secrets)

**Key Rule:**

Secrets from a child scope cannot be accessed from a parent scope. For example, a Project-level secret cannot be referenced from an Organization or Account-level entity.
