```Subject: get_user_permissions() returns empty f...
# permit-saas
x
Copy code
Subject: get_user_permissions() returns empty for users with multiple groups, and ignores group-derived grants when a user also has a direct role assignment

Environment:
- Project: default / Environment: dev
- PDP: Cloud PDP (<https://cloudpdp.api.permit.io>)
- SDK: permit-sdk-python 2.8.3, Python 3.10.7

Issue 1 — multiple groups on one user breaks all permission retrieval
User x-i-a_test-multi-group is a member of two groups (developer, data_user). Each group individually grants working permissions when assigned alone (verified via x-i-a_test-developer, group developer only, and x-i-a_test-data-user, group data_user). But with both groups on the same user, get_user_permissions() returns {} for every resource instance touched by either group — not just a conflict on overlapping resources.

Example:
user: x-i-a_test-multi-group (groups: developer, data_user)
resource: scope_artifactregistry:x-i-a_artifactregistry_france
expected: [repositories_delete_artifacts, repositories_download_artifacts, repositories_upload_artifacts]
actual:   []

5 of 5 checks failed for this user across all its resource instances.

Issue 2 — direct role assignment on a user causes their group-derived grant to be dropped
User x-i-a_test-data-user has both a group (data_user) and a direct role assignment (run.builder on scope: france) in the same membership entry. The direct role's permissions (france scope) resolve correctly, but the permission granted purely through the data_user group (on a different scope, project_a) comes back empty:

user: x-i-a_test-data-user
resource: scope_storage:x-i-a_storage_project_a
expected: [buckets_get, buckets_list]   <- granted via group "data_user"
actual:   []

By contrast, x-i-a_test-direct-role (role only, no group) resolves correctly, confirming the role path itself works — it's specifically the presence of a group and a role together on one user that suppresses the group's grant.

Ask: Is this expected PDP behavior (e.g. groups + roles or multi-group not being additive/merged), a caching/propagation issue, or a bug in permission resolution? Happy to share full config (group->role assignments, membership.yml) and a repro script (config/auth/validate_permit.py) that reproduces both against our environment on request.
a
Hi @X IA, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
Based on the available documentation, the behavior you're describing with multiple groups and mixed group/role assignments isn't explicitly covered in the sources provided. However, your issue appear
To learn more, see the sources I considered: [[1] Cloud PDP Capabilities](https://docs.permit.io/concepts/pdp/cloud-pdp-capabilities)
e
Hi @X IA, thanks for the detailed report. the way you isolated each case with separate test users makes this really easy to follow. To answer your question directly: this is not expected behavior. Permissions in Permit are additive - grants from multiple groups should merge, and a direct role assignment should never suppress a group-derived grant. So what you're seeing looks like a bug on our side, and we'll check it. Two things that would help us move fast: 1. Please share the repro script and config you mentioned (right here in the thread or DM to @david, whatever you prefer), plus your project/environment IDs, so we can reproduce against your exact setup. 2. A quick check on your side: for one of the failing cases (e.g. `x-i-a_test-multi-group`on`scope_artifactregistry:x-i-a_artifactregistry_france`), does a plain`permit.check()`also return`false`, while`get_user_permissions()`returns empty? That tells us whether this affects enforcement or only the permission-listing endpoint - useful for both of us to gauge urgency.
o
Hey @X IA , Can you share the workspace, project, environment for the environment you were talking about. Can you share for each expected permission, which permission path do you expect to grant this access ? Can you verify a container pdp returns different results than the cloud pdp ?