This message was deleted.
# permit-saas
s
This message was deleted.
a
Hi @Lewis Youl, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
Based on the error you're encountering, it appears your API key may not have the correct access level for creating tenants. The error suggests an authorization issue when trying to create tenants through your local PDP. Looking at the tenant creation process, the API endpoint for creating tenants requires proper authorization (1) . When creating a tenant, you need to ensure your
API_SECRET_KEY
has the appropriate permissions . The fact that resources and roles are created successfully but tenants fail suggests a specific permission issue with tenant operations (2) (1) . Tenants in Permit.io are first-class citizens with dedicated management interfaces (2) . To help our engineers investigate this issue further, could you please provide: 1. Which Workspace / Project / Environment you are using 2. What calls you are performing (as SDK code or CURL) 3. Which PDP version you are running 4. Any relevant logs from your PDP Additionally, you might want to verify: • That your API key is correctly configured for the new environment • The API key has environment-level permissions for tenant operations • Your local PDP at
<http://localhost:7766>
is properly connected with the correct API key The endpoint pattern you're using (
/v2/facts/{project_id}/{env_id}/tenants
) is correct for tenant creation (1) , so the issue appears to be specifically related to authorization rather than the API structure itself.
To learn more, see the sources I considered: [[1] Create Tenant](https://docs.permit.io/api/examples/create-tenant) [[2] Multi-Tenant Authorization](https://docs.permit.io/concepts/multi-tenant-authorization)