> This page is for Multi-Tenant, version v3.0 (default).
> For other versions, use one of these documentation indexes:
> - v3.0 (default): https://docs.nvidia.com/run-ai/multi-tenant/v3.0/llms.txt
> - v2.26: https://docs.nvidia.com/run-ai/multi-tenant/v2.26/llms.txt
> - v2.25: https://docs.nvidia.com/run-ai/multi-tenant/v2.25/llms.txt
> - v2.24: https://docs.nvidia.com/run-ai/multi-tenant/v2.24/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/run-ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/run-ai/_mcp/server.

# List the access rules assigned to the requesting user.

GET http://localhost:8080/api/v1/authorization/me/access-rules

Retrieve the access rules assigned to the requesting user.

Reference: https://docs.nvidia.com/run-ai/multi-tenant/reference/rest-api/endpoints/authentication-and-authorization/me/get-me-access-rules

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication

## Request

### Query parameters

- `limit` (integer, optional, default: 50) — The maximum number of entries to return.
- `offset` (integer, optional) — The offset of the first item returned in the collection.
- `search` (string, optional) — Filter results by a free text search.

## Response

### 200

Executed successfully.

- `accessRules` (MeAccessRulesResponseAccessRules, optional)

## Errors

### 400 Bad Request Error

Bad request.

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 500 Internal Server Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 503 Service Unavailable Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

## Types

### MeAccessRulesResponseAccessRules

- `totalRecords` (integer, required)
- `displayRecords` (integer, required)
- `accessRules` (list of MeAccessRule, required)

### MeAccessRule

- `subjectId` (string, required) — The unique identifier of the subject (e.g., user, group, or app).
- `roleId` (integer, required) — The numeric ID of the assigned role.
- `scopeId` (string, required) — The unique identifier of the scope.
- `scopeType` (enum, required)
  - Allowed values: `system`, `tenant`, `cluster`, `department`, `project`
- `subjectType` (enum, required) — Subject type enum for access rule responses. Extends SubjectType with the built-in all-authenticated-users subject, which applies to every authenticated user and service account. Note: The 'app' subject type is DEPRECATED. Please use 'service-account' instead for service accounts.
  - Allowed values: `user`, `app`, `service-account`, `group`, `all-authenticated-users`
- `roleName` (string, required) — The name of the assigned role (e.g., admin, viewer).
- `scopeName` (string, required) — Human-readable name of the scope (e.g., tenant-x).
- `tenantId` (integer, required) — The id of the tenant.
- `clusterId` (string, optional) — The id of the cluster.
- `id` (integer, optional)

## Examples

**Response**

```json
{
  "accessRules": {
    "totalRecords": 1,
    "displayRecords": 1,
    "accessRules": [
      {
        "subjectId": "user@run.ai",
        "roleId": 53142648,
        "scopeId": "a418ed33-9399-48c0-a890-122cadd13bfd",
        "scopeType": "system",
        "subjectType": "user",
        "roleName": "admin",
        "scopeName": "tenant-x",
        "tenantId": 1001,
        "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
        "id": 32
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "http://localhost:8080/api/v1/authorization/me/access-rules"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:8080/api/v1/authorization/me/access-rules';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/authorization/me/access-rules"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/authorization/me/access-rules")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/authorization/me/access-rules")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8080/api/v1/authorization/me/access-rules', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/authorization/me/access-rules");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/authorization/me/access-rules")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```