Hi. We are getting organization not found errors b...
# general
n
Hi. We are getting organization not found errors but the organizations themselves exist. Could you help us identify the problem?
o
First guess would be the organization (resource instance) exists but under a different tenant @Ask Inkeep
a
Thanks for tagging me @Or Weis. I'll look through relevant sources and get back to you shortly.
The "organization not found" error when the organization exists is likely a tenant scoping issue. In Permit.io, tenants represent isolated silos of resources and users (1) . Resource instances belong to specific tenants, and only users within that tenant can access those resources . When performing permission checks, you must specify the correct tenant. Here's the proper format for checking permissions on a resource instance:
Copy code
const permitted = await permit.check(userKey, "action", {
  type: "resource_type",
  tenant: tenantKey,
}) ;
To troubleshoot this issue, I need some additional information from you: 1. Which Workspace / Project / Env are you using? 2. What calls are you performing? (Please share the SDK code or CURL request) 3. Which PDP version are you running? 4. Can you share relevant logs from your PDP? Additionally, verify: • The resource instance was created with the correct tenant specified • Your permission check includes the matching tenant parameter • The user has been assigned to the same tenant where the organization exists (2) You can use the List Role Assignments API to verify which tenant contains your organization resource instance (3)
To learn more, see the sources I considered: [[1] Multi-Tenant Authorization](https://docs.permit.io/concepts/multi-tenant-authorization) [[2] Sync your First User](https://docs.permit.io/overview/sync-your-first-user-with-sdk) [[3] GET /v2/facts/{proj_id}/{env_id}/role_assignments/detailed](https://api.permit.io/v2/redoc#tag/Role-Assignments/operation/list_role_assignments_detailed) [[4] Overview](https://docs.permit.io/api/examples/filter-role-associations)
n
@Or Weis it used to work fine for a long time. Just happened today suddenly
There is no multi tenant
@Ask Inkeep live env. it's not about pdp, the error is on permit ui, not on pdp
a
Thanks for tagging me @Nuru Hesenov. I'll look through relevant sources and get back to you shortly.
* Thanks for clarifying this is happening in the Permit UI in your live environment and started suddenly today. Even if you're not explicitly using multi-tenancy, Permit.io has a default tenant that all resources belong to (1) . The "organization not found" error in the UI could indicate: • The organization resource instance exists but may have become associated with an incorrect or missing tenant reference • A recent change or sync issue affecting how the UI queries organization data Since this worked fine previously and broke suddenly today, this suggests a data sync or configuration issue rather than a code problem. To help diagnose this UI issue, please provide: 1. Which ​*Workspace / Project / Environment*​ you're using in the live environment 2. Can you share the ​*exact error message*​ you're seeing in the UI (screenshot would be helpful) 3. Are you able to see these organizations via the ​*API*​ (even if the UI shows the error) ? 4. Did any ​*configuration changes*​ happen today (policy updates, role changes, user assignments) ? You might also want to verify the organization exists by checking via the API directly, which can help determine if this is purely a UI display issue or a deeper data problem. For immediate support with UI-specific issues in your live environment, I'd recommend reaching out over Email with the above details so the engineering team can investigate your specific workspace configuration.
To learn more, see the sources I considered: [[1] Multi-Tenant Authorization](https://docs.permit.io/concepts/multi-tenant-authorization)
o
This might just be a FE issue as I see the assignment does exist
Will escalate to the team
n
@Or Weis not just FE issue, fails on BE as well
I mean fails on sdk
o
Can you share the SDK/API error you got ?
n
@Or Weis Alright, I'll run on SDK
🙏 1
give me min
ack 1
@Or Weis okay, now assigning using sdk worked, but will the same problem of losing roles reappear again?
o
This seems to be a pagination issue in the front end (bug)- it started happening as you added more resources and exceeded the page size. The team is already working on a fix CC: @Ze'ev Manilovich , @Shuvy Ankor
n
@Or Weis well, the issue isn't about frontend or pagination. The problem was that the organization lost the companies that are assigned to it. I had to reassign them again.
Frontend not working was something we faced while debugging that
o
Probably- either unrelated issue, or something that happened as a result of interacting with the faulty UI
If you see other errors in API,SDK, or PDP please share and we’ll investigate
n
@Or Weis we didn't touch faulty UI when the problem appeared. we only opened it because of the problem.
o
Happy to investigate any errors you can report
n
@Or Weis thanks. Please check why these companies
Copy code
2320
2321
2324
2325
2326
2346
2372
are unassigned from organization 309
o
That’s not an error
Assign them; if you get an error for that we can investigate
It’s extremely unlikely that your assignments were removed automatically
n
@Or Weis could it be because resource limit exceeded?
it was on startup and we moved to pro to fix it
o
No, we don’t delete data without warning.
n
@Or Weis I see, this is really weird in that case. Thanks anyways.