# tenants (restricted)

### Overview

The `tenants` RPC method displays the current list of registered data storage tenants on the Lynx blockchain. This command provides visibility into all user accounts that have permission to store data on the blockchain, helping administrators manage storage access rights within the system.

### Syntax

```
tenants
```

### Description

When you invoke the `tenants` method, the Lynx daemon retrieves and displays the complete list of registered storage tenants from the authentication system. Each tenant is represented by their unique public key hash in hexadecimal format. This command is particularly useful for administrators who need to verify which accounts have storage privileges or audit the current tenant roster before making changes.

### Parameters

This method does not accept any parameters.

### Returns

The method returns an array of hexadecimal strings, where each string represents a tenant's public key hash:

```
[
  "1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t",
  "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
  ...
]
```

Each element in the array is a 40-character hexadecimal string representing the public key hash (RIPEMD-160) of a registered tenant. These identifiers correspond to the `tenant` field returned by other commands such as `store` and `fetch`.

### Access Control

{% hint style="danger" %}
The `tenants` command is restricted to administrative use only.
{% endhint %}

### Examples

#### List all registered tenants

For a blockchain manager:

```
lynx-cli tenants
```

Output:

```
[
  "1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t",
  "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0"
]
```

For a non-manager user:

```
Role-based restriction: Current role cannot perform this action
```

Using JSON-RPC:

```
curl --user manager:password --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "tenants", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:9332/
```

### Implementation Notes

* No additional metadata about tenants is provided beyond their public key hashes
* This command does not modify the tenant list; it only displays the current state


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getlynx.io/lynx-core/data-storage/tenants-restricted.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
