Automatic addition of users to group based on email domain

On our forum, we created a custom group for users with a certain email domain. My understanding was that new users who join the site with this domain would automatically be added to the group. However, it doesn’t seem to be functioning in an automated fashion. Right now I have to go to Group > Membership and click Save Changes to see the most recent wave of new users get added to this group. Otherwise they don’t seem to be added.

Is this expected behavior? I should also add that we’re using SSO, so I’m unsure whether that would impact this feature.

1 Like

@sam this is the same as the other recent report, where these rules aren’t consistent.

2 Likes

Looks like an SSO bug to me

Can you confirm you are using Official Single-Sign-On for Discourse (sso)

4 Likes

Yes, we are using the official SSO for Discourse.

3 Likes

I think this is the bug.

When you were updating emails via SSO cause you have sso_overrides_email enabled the auto group membership was not taking.

It would take for initial user creations.

Note, there is the whole “retroactive” concept that is massively confusing, we should probably just remove that. I recommend you make sure Apply the same email domain rule to add existing registered users is always set, we are going to be removing it.

https://github.com/discourse/discourse/commit/b824898f614d21c43a78fec30481757341106d5a

3 Likes

I would suggest that you manage those groups with sso and push them when they log in.

1 Like