Hi can I check if webhook notifications are still ...
# permit-saas
j
Hi can I check if webhook notifications are still being sent when the roles are changed using the User Management Permit Element? This used to be working previously, but when I set-up a new project and enabled the webhook, this no longer seems to be the case
a
Hi @jason.chaw, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
Based on the available sources, webhooks for User Management Elements should trigger when roles are assigned. The documentation shows that when a role is assigned to a user through the User Management Element, a webhook with type
role_assignment
is sent (1) . The expected webhook payload for role assignment is:
Copy code
{
  user_id: str,
  tenant_id: str,
  role: str,
  permission_level: str,
  type: ElementsWebhookType = "role_assignment"
}
To troubleshoot why webhooks aren't being received in your new project, verify: 1. The webhook URL is correctly configured in your element settings 2. Your endpoint is responding with a 200 HTTP status code to acknowledge receipt 3. Your endpoint uses HTTPS for secure data transmission 4. If you're using a secret for validation, ensure it matches between your configuration and endpoint To help investigate this issue further, could you provide: 1. Which Workspace / Project / Env you are using 2. What calls are you performing (as SDK code or CURL) 3. Which PDP version you are running 4. Relevant logs from your PDP Additionally, check if your webhook endpoint is properly set up to receive POST requests and parse the JSON payload .
To learn more, see the sources I considered: [[1] Configure Webhooks](https://docs.permit.io/embeddable-uis/webhooks)
j
I've checked the configuration, and it looks correct, but the webhook is still not firing. Workspace: Changi Full Stack Solutions Project: Wildlife Management System Env: Production @Ask Inkeep
a
Thanks for tagging me @jason.chaw. I'll look through relevant sources and get back to you shortly.
Thanks for providing those details. Since your configuration looks correct but webhooks aren't firing for role changes in the User Management Element, let's verify a few additional points: ​*Webhook Configuration Checklist:*​ (1) 1. Ensure your webhook URL endpoint is accessible and can receive POST requests 2. Verify your endpoint responds with a 200 HTTP status code to acknowledge receipt 3. Confirm your endpoint uses HTTPS for secure data transmission 4. If using a secret for validation, verify it matches between your Permit configuration and your endpoint implementation ​*Expected Webhook Payload for Role Assignment:*​ When a role is assigned through the User Management Element, you should receive:
Copy code
{
  user_id: str,
  tenant_id: str,
  role: str,
  permission_level: str,
  type: ElementsWebhookType = "role_assignment"
}
To help our engineers investigate this issue in your Production environment, please provide: 1. What calls are you performing (as SDK code or CURL) when changing roles 2. Which PDP version you are running 3. Relevant logs from your PDP showing the role assignment operations 4. Any error logs from your webhook endpoint (if available) Also, can you confirm whether: • Webhooks for other events (like user creation or invites) are working? • This is specifically affecting only role assignment webhooks? • You're seeing any errors in the Permit dashboard or browser console when making role changes? This information will help pinpoint whether the issue is with the webhook configuration, the element setup, or something else in your environment.
To learn more, see the sources I considered: [[1] Configure Webhooks](https://docs.permit.io/embeddable-uis/webhooks)
j
I am changing the role using the User Management Permit Element embedded in my app. The role change is successful, and the webhook is set-up correctly, just that it's not firing whenever the role changes @Ask Inkeep
a
Thanks for tagging me @jason.chaw. I'll look through relevant sources and get back to you shortly.
Thanks for confirming that the role changes are successful through the User Management Element but webhooks aren't firing. Based on the documentation, role assignment webhooks should trigger when roles are changed through the User Management Element (1) . Since the role changes are working but webhooks aren't firing specifically in your new Production environment (while they worked previously) , this could indicate an environment-specific configuration issue. ​*Please verify in your Permit dashboard:*​ 1. Navigate to your Wildlife Management System project → Production environment → Elements settings 2. Confirm the webhook is enabled specifically for the User Management Element in this environment 3. Check if the webhook URL is correctly configured with HTTPS 4. Verify the webhook secret (if used) matches your endpoint configuration ​*To help our engineers investigate further, please provide:*​ 1. The exact SDK code or API calls your User Management Element is making when changing roles (check your browser's Network tab for the API calls) 2. Which PDP version you are running in Production 3. Relevant logs from your PDP showing the role assignment operations 4. The webhook configuration from your Element (you can find this in the Elements configuration panel) ​*Also helpful to know:*​ • Are webhooks for other Element actions (like
create_user
or
invite_user
) firing correctly in this environment? • Can you check your webhook endpoint logs to see if any requests are being received at all? • Does the webhook work if you test it with other actions through the same Element? This will help isolate whether the issue is specific to
role_assignment
webhooks or a broader webhook delivery problem in your Production environment.
To learn more, see the sources I considered: [[1] Configure Webhooks](https://docs.permit.io/embeddable-uis/webhooks)
j
@Ask Inkeep Pls see screenshots for requested info
a
Thanks for tagging me @jason.chaw. I'll look through relevant sources and get back to you shortly.
I don't have access to view screenshots in this conversation. However, based on your description, the role assignments are working through the User Management Element but the
role_assignment
webhook isn't firing in your Production environment (1) . Since you've confirmed the webhook configuration looks correct and role changes are successful, this points to a potential issue with webhook delivery specific to your environment setup. ​*To help our engineers investigate this issue, please provide:*​ 1. Which Workspace / Project / Env you are using ✓ (You've provided: Changi Full Stack Solutions / Wildlife Management System / Production) 2. What calls are you performing - specifically the API calls visible in your browser's Network tab when you change a role through the User Management Element 3. Which PDP version you are running 4. Relevant logs from your PDP showing the role assignment operations ​*Additional information that would help:*​ • Are other webhook types (
create_user
,
invite_user
) firing correctly in this environment? • Any error logs from your webhook endpoint • The webhook URL and configuration from your Element settings (you can redact sensitive parts) The expected webhook payload for role assignments should be :
Copy code
{
  user_id: str,
  tenant_id: str,
  role: str,
  permission_level: str,
  type: ElementsWebhookType = "role_assignment"
}
If you can share the screenshots via a different method or describe what they show, that would help narrow down the issue.
To learn more, see the sources I considered: [[1] Configure Webhooks](https://docs.permit.io/embeddable-uis/webhooks)
j
Can you put me in contact with a human
it's frustrating dealing with you
you just keep asking the same questions @Ask Inkeep
a
Thanks for tagging me @jason.chaw. I'll look through relevant sources and get back to you shortly.
I understand your frustration. Let me connect you with human support immediately. For direct assistance with your webhook issue in the Wildlife Management System Production environment, please reach out over Email (1) . When contacting them, mention: • ​*Workspace*​: Changi Full Stack Solutions • ​*Project*​: Wildlife Management System • ​*Environment*​: Production • ​*Issue*​: Role assignment webhooks not firing through User Management Element (though role changes are successful) The Permit.io team will be able to investigate this specific issue in your environment directly.
To learn more, see the sources I considered: [[1] Configure Webhooks](https://docs.permit.io/embeddable-uis/webhooks)