---
title: "Permissions sync | Docs | Private AI Workspace by R&D Copilot"
description: "Keep indexed documents aligned with current source access."
canonical: "https://private-ai.rdcopilot.com/docs/configuration/permissions-sync/"
language: en
updated: 2026-11-22
---

# Permissions sync

Keep indexed documents aligned with current source access.

## Permission ownership

The source directory remains the authority for membership. The knowledge space records its permissionSource and lastSync. Indexing a file does not give everyone permission to read it; retrieval checks the caller against the current space policy.

## Verify a permission change

Change access at the source, synchronise permissions, and repeat the same retrieval as the affected identity. Confirm removed documents are absent from new results and questions. Do not treat an old answer already read by a person as retrievable data that can be recalled.

1.  Test a newly added user and a removed member separately.
2.  Check failed syncs before accepting the recorded lastSync as current.
3.  If policy cannot be resolved, stop access to the affected space until it is reconciled.

curl

```bash
curl "$RDC_BASE_URL/private-ai/v1/spaces?limit=20" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/spaces?limit=20`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/spaces?limit=20',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/spaces?limit=20');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/spaces?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 200

```json
{
  "items": [
    {
      "id": "warehouse",
      "name": "Warehouse",
      "permissionSource": "directory",
      "lastSync": "2026-11-23T06:00:00Z"
    },
    {
      "id": "finance",
      "name": "Finance",
      "permissionSource": "directory",
      "lastSync": "2026-11-23T06:00:00Z"
    }
  ],
  "nextCursor": null
}
```
