Skip to content

Webhooks user.delete and user.create don't fire if set to specific application #1354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alapins opened this issue Aug 20, 2021 · 2 comments
Closed

Comments

@alapins
Copy link

alapins commented Aug 20, 2021

Webhooks user.delete and user.create don't fire if set to specific application

Description

Webhooks user.delete and user.create don't fire if set to specific application. They are not listed in the documentation as being only for all applications.

Affects versions

1.29.0

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a tenant "tenant1" different from the default fusionauth tenant
  2. Create an application "app1" for "tenant1"
  3. Turn on user.create and user.delete webhooks, and set their transaction to "All webhooks must complete successfully"
  4. Create a webhook for user.create and user.delete, and from the applications tab, turn off "All Applications" and select "app1"
  5. Create a user specifically for tenant1 (I'm logging in using a google account with the relevant connector, with the tenant set to autocreate users with social logins)

Expected behavior

The specified webhook will be called with a user.create event

Platform

  • Database PostgresSQL (AWS RDS 12.4)

Additional context

I'm not sure if this is a multitenant problem or a problem in resolving app-specific webhooks. I'm assuming that it's some resolution problem and FusionAuth doesn't see that there are any webhooks, otherwise it should fail based on the transaction setting. It would probably be a good idea, if the tenant is set up to fire webhooks, and no webhooks are found, to fail the transaction (since that would be a smell that something is set up incorrectly, although it would then require setting up the webhook before enabling it in the tenant if doing in a running system).

We have two tenants on our system, and the same e-mail may exist in both systems. We would like to only receive events for one of the tenants; while we could work around the problem by screening by tenantid in the webhook itself, but that complicates things substantially for us (we have to look up the tenantid for the desired application when the webhook-receiving-application starts up, and pull the value from the cache when receiving the webhook).

@robotdan
Copy link
Member

robotdan commented Aug 20, 2021

The issue is you selected an application. Switch it to all applications and retry.

See the “All applications” description here https://fusionauth.io/docs/v1/tech/events-webhooks/

The application config is a legacy option and it is confusing.

@robotdan
Copy link
Member

robotdan commented Jan 7, 2022

The enhancements proposed here #1543 should make this much less confusing.

@robotdan robotdan closed this as completed Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants