Idp link event not firing - am I doing something wrong?
-
I am integrating 3rd party Azure AD idps using OIDC as per the instructions here. I have elected to use the link on email strategy with a user that must exist in FusionAuth prior to linking. This works nicely and I can use the API to retrieve the link for a user when I've used Azure AD to authenticate at least once.
I have also set up a webhook for the
user.identity-provider.link
event. This works well when tested using the button in the UI, but never seems to fire for the actual live event in the above scenario - my webhook is never called. Below are some screenshots of the webhook configuration. Perhaps someone could verify that I've not missed anything that would explain the absent event?Settings -> Webhooks
Tenants -> id -> Webhooks
I'm not sure this last enablement is required given the global setting, but it doesn't seem to make any difference either way - on or off.My FusionAuth version is 1.40.2 running in Docker.
Thanks in advance for any ideas.
-
-
Thanks for the question -- I don't think that this will work in the way that you intend.
I would have to test to be sure, but if FusionAuth cannot make the user (based on your chosen user provisioning policy), then this user will not be created and thus not linked, and therefore this event will not fire.
https://fusionauth.io/docs/v1/tech/events-webhooks/events/user-identity-provider-link
Depending on your desired outcome, it might be best to change your linking strategy (to create this user when linking) and then use
user.create
webhooks. You could fail this transaction if certain requirements are not met (thus the user will not be created and linked).I hope this helps!
Thanks,
Josh -
Hi Josh,
Thanks for taking the time to reply. In the scenario outlined I perhaps didn't mention that the users I was expecting the webhook to fire for already existed in FusionAuth prior to Azure AD sign-in. Should I expect the event to trigger in that instance?
Regards
Stefan