We currently have a field called external_id that contains the user ID we use for SSO. I’d like to be able to pass that field via webhook. It’s currently not part of the data that’s sent over. Is there a way to add it?
What type of webhook are you using? For sites with SSO enabled, the
external_id should be present in the User Event webhook payload.
It’s a User Event webhook but the external_id value isn’t being passed.
I just had a look at the code. It turns out that the
external_id is only passed in the User Event webhook payload for admin users. I am not sure why we only send the
external_id in the payload for site admins.
Would there be a way to add that field?
I know that we are cautious about adding the
external_id to publicly viewable data, but it seems like it would be safe to add it to the webhook payload. Possibly someone on the Discourse engineering team will have ideas about that.
Looking at the code, it doesn’t seem like it would be difficult to add the
external_id for all users to the User Event webhook through a plugin. I’d like to have a better understanding of why we’re only passing the
external_id for admin users before suggesting that approach though.