Elias Cooper
11/04/2025, 8:41 PMAsk Inkeep
11/04/2025, 8:41 PMpermit support automation2
11/04/2025, 8:41 PMAsk Inkeep
11/04/2025, 8:41 PMpage and per_page parameters to navigate through the pages .
The response schema for role assignments includes :
[
{
"user": "<mailto:jane@coolcompany.com|jane@coolcompany.com>",
"role": "admin",
"tenant": "stripe-inc"
},
{
"user": "<mailto:jane@coolcompany.com|jane@coolcompany.com>",
"role": "admin",
"tenant": "stripe-inc",
"resource_instance": "document:doc-1234"
}
]
If you're seeing missing entries, this could be due to pagination limits. The API returns a maximum of 100 role assignments per page , so you may need to paginate through multiple pages to get the complete list.
To help our engineers investigate this issue further, could you please provide:
1. Which Workspace / Project / Env 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
This information will help us determine if there's a specific issue with your setup or if you're encountering the pagination limit.Ask Inkeep
11/04/2025, 8:41 PMElias Cooper
11/04/2025, 8:42 PMElias Cooper
11/04/2025, 8:44 PMconst response = await fetch(
``${process.env.PERMITIO_PDP}/local/role_assignments?user=${normalizedUser.key}`,`
{
method: "GET",
headers: {
`Authorization: Bearer ${process.env.PERMITIO_API_KEY},`
"Content-Type": "application/json",
Accept: "application/json",
},
}
)
I know for a fact that this is working -- roles are being returned. Only now they're missing my Admins for some reason.
For what it's worth, when using the SDK, the Admin role is returned:
public async getUserRoles(email: string, role?: string) {
const permit = this.permitContainer.getPermit()
if (role) {
return await permit.api.roleAssignments.list({ user: email, role })
}
return await permit.api.roleAssignments.list({ user: email })
}
PDP Logs provided below.Natalia Edelson
11/04/2025, 8:47 PMElias Cooper
11/04/2025, 8:47 PMAsk Inkeep
11/04/2025, 8:48 PMElias Cooper
11/04/2025, 8:48 PMElias Cooper
11/04/2025, 8:48 PMAsk Inkeep
11/04/2025, 8:48 PMpermitio/pdp-v2:0.3.0 and above (1) . The function accepts optional filters including user_key, tenant_key, role_key, and resource_instance_key .
To help our engineers investigate why Admin roles are missing from your PDP's local query results:
1. *Which Workspace / Project / Env are you using?*
2. *What specific PDP version are you running?* (You can check with docker ps to see the exact image version)
3. *Could you share the relevant PDP logs?* (You mentioned you have logs - these would be crucial for debugging)
4. *What exact SDK calls are working correctly?* (The code you shared helps, but knowing the exact response differences would be valuable)
The discrepancy between the SDK API call (which returns Admins) and the local PDP query (which doesn't) suggests a potential sync issue between your PDP and the Permit.io control plane. The PDP should have the same data as what's returned via the SDK's API calls.Ask Inkeep
11/04/2025, 8:48 PMElias Cooper
11/04/2025, 8:50 PMAsk Inkeep
11/04/2025, 8:52 PMAsk Inkeep
11/04/2025, 8:52 PMAdmin role for the OPUS resource, while the PDP local endpoint only returns 12 assignments, missing that Admin role entirely.
This appears to be a data synchronization issue between your PDP (v0.8.1) and the Permit.io control plane. The PDP's local datastore may not have the complete role assignment data.
Based on your setup, here are a few things to check:
1. *FactDB Configuration*: If you're using FactDB (1) , ensure it's properly enabled both in your environment settings and on the PDP with PDP_FACTDB_ENABLED=true .
2. *PDP Data Sync*: The PDP should automatically sync with the control plane. Check if there are any sync errors in your PDP logs that might explain why the Admin role isn't being stored locally.
To help our engineers investigate this regression (since you mentioned it previously worked) :
1. *Which Workspace / Project / Env are you using?*
2. *Exact PDP version*: You mentioned permitio/pdp-v2:0.8.1 - can you confirm this is correct?
3. *PDP logs*: Please share the relevant PDP logs, especially any sync or data update messages
4. *When did this stop working?* Any recent changes to your setup?
The fact that the SDK API call returns the correct data but the local PDP query doesn't strongly suggests the PDP's local cache is incomplete. This could be related to how the OPUS resource instance is being synchronized to the PDP.Ask Inkeep
11/04/2025, 8:52 PMElias Cooper
11/04/2025, 8:58 PMAsk Inkeep
11/04/2025, 8:58 PMAsk Inkeep
11/04/2025, 8:58 PMAsk Inkeep
11/04/2025, 8:58 PMElias Cooper
11/04/2025, 9:00 PMElias Cooper
11/04/2025, 9:06 PMAlon Boshi
11/05/2025, 8:33 AMThomas
11/05/2025, 6:02 PMlatest so that if it happens again we'll be able to adress the issue better.
@Elias Cooper keep us posted if you run into this issue again.