Hi there, I'm currently working on embedding the U...
# permit-saas
v
Hi there, I'm currently working on embedding the User Management Element into my web frontend. It's mostly working as expected, however there seems to be an issue where the
X users are requesting access
section never loads the users' names/emails. When I look in the browser console, the embedded element is making continuous GET requests to
/v2/elements/{...}/data/users?page=1
but never progresses past page 1. Is this a bug? Can someone please take a look?
a
Hi @Vinny Coyne, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
Based on the information available, this could be related to how the Access Request Element is connected to your User Management Element. The Access Request Element needs to be properly linked to a User Management Element to display pending access requests. (1) Here are a few things to verify: 1. ​*Element Connection*​: Ensure your Access Request Element is connected to the correct User Management Element. In the Elements Screen, open your User Management Element and verify that under "Approval Component in user management", your Access Request Element is selected. 2. ​*User Sync*​: Make sure users requesting access exist in your Permit system. The documentation recommends syncing users with metadata to enhance clarity in the UI. (2) 3. ​*Permission Levels*​: Verify that the logged-in user has the appropriate permission level to view access requests. Only users with "Workspace Owner" or "Manager" roles can view and manage access requests, while "Viewer" can only view the element. (3) 4. ​*Backend Login Route*​: Confirm your server-side
loginAs
route is properly configured and the user is successfully authenticated to the element. To help our engineers investigate this further, could you please provide: 1. Which Workspace / Project / Env you are using 2. What calls are they performing (as SDK code or CURL) 3. Which PDP version you are running 4. To share relevant logs from your PDP This will help determine if there's an issue with the element configuration or a potential bug in the pagination logic.
To learn more, see the sources I considered: [[1] Access Request Element](https://docs.permit.io/embeddable-uis/element/access-request) [[2] Access Request MCP Implementation Guide](https://docs.permit.io/ai-security/access-request-mcp/implementation-guide) [[3] The Ultimate Guide to Permit Elements](https://www.permit.io/blog/elements-guide)
v
I asked Claude to analyse this for me (so this might not be correct):
Copy code
Tracing the bundled embed JS (<http://embed.permit.io/static/js/5728.*.chunk.js|embed.permit.io/static/js/5728.*.chunk.js>)
  shows the hook hardcodes:

    refetchInterval: 10000,
    refetchOnWindowFocus: true,
    staleTime: 10000,
    getNextPageParam: default ()=>{}  // never returns a next-page param

  The 10s polling generates unnecessary load and (more importantly) the
  no-op getNextPageParam means infinite-scroll pagination never advances
  past page 1 in the rendered UI, even when totalCount > perPage. We
  have ~50 users in this tenant; only the first 20 are ever shown.
Attached screen recording of the issue
e
Hi @Vinny Coyne Thanks a lot for the detailed report. You’re absolutely right, this is a bug on our side in the way the pending-access list loads requester details. I’ve opened an internal ticket for it and the team is already looking into it. @david Will keep you posted here as soon as we have a fix.
v
Thanks so much - appreciate the quick response! thanks
✅ 1
Hi just checking to see if there's an ETA for this fix? Thanks
d
Hi @Vinny Coyne It should be resolved by next week. I will update you when the fix is in place 🙂
v
Amazing, thanks so much
d
Hi @Vinny Coyne the change should be deployed. Please check and let me know if something does not look okay 🙂
v
@david Thanks for the update. I tried it this morning but I'm still seeing the same issue (tried in a couple of different browsers, disabled cache, forced reload, etc). The JS being loaded by the embedded iframe is https://embed.permit.io/static/js/main.3b22cfce.js - is that the version with the expected fix?
d
Hi @Vinny Coyne Ill look into this and get back to you
v
Thanks thanks
s
Hi @Vinny Coyne I’ll check everything, send me (you can in DM) Organization Project Environment Tenant Element Name
✅ 1