- Complete Multi-Tenant Setup to configure your environment
- Read Multi-Tenant Architecture to understand the concepts
Example: Sharing a Dataset Between Users
This example shows how to create a dataset, add data, and share it with another user.Step 1: Start the API Server
Step 2: Login as First User
Step 3: Create a Dataset
{"id": "dataset-uuid-123", "name": "shared_docs", "owner_id": "user-uuid-456", ...}
Step 4: Add Data to Dataset
Step 5: Search Your Dataset
Step 6: Create Second User
Step 7: Grant Permission to Second User
Step 8: Second User Searches Shared Dataset
Example: Using Python SDK
This example shows the same workflow using the Python SDK.Step 1: Enable Multi-Tenant Mode
Step 2: Add Data and Create Dataset
Step 3: Grant Permissions Programmatically
Common Issues
Permission denied:- Check user has required permission on the dataset
- Verify dataset UUID is correct
- Use
dataset_ids
instead ofdatasetName
for cross-owner datasets
- Confirm user has
read
permission - Check dataset exists and contains data
- Verify search query syntax
- Confirm
ENABLE_BACKEND_ACCESS_CONTROL=true
is set - Check database files exist:
ls -la .cognee_system/databases/<user_uuid>/
- Verify file storage isolation:
ls -la .data_storage/<tenant_uuid_or_user_uuid>/
- Verify token is valid and not expired
- Check API server is running
- Confirm credentials are correct