Automatically add new users to an organization

Is there a way to configure Grist (self-hosted for now) to automatically add new users to an organization? I’m using the GRIST_SINGLE_ORG configuration and SAML login, and everything works flawlessly, except for the organization assignment part. This is what a new user sees when logging in:

I could add this behavior myself, but maybe upstream Grist already has something like this :slight_smile:

1 Like

Hi @Ivan_Filgueiras, we don’t have that behavior yet. You’re not the first to ask about it. There is a way to add users in bulk, but you still need their email addresses up front. If you do add the behavior yourself, a pull request would be very welcome :slight_smile:

1 Like

Will do!

What do you think about making this the default behavior if the deployment is using GRIST_SINGLE_ORG? I’m trying to figure out how to approach this in the code.

Off the top of my head, a good hook might be here:

At this point the page is loading, the user is known, and we’ve determined they don’t currently have access to whatever they are trying to look at.

Or, on the back end, you could look at tweaking the endpoints that serve landing pages:

I’d say if you do make a PR, we wouldn’t want this to be the default behavior, since it could be a surprise for existing users. Presumably some extra configuration is needed, to express what level of access is to be granted automatically? Presence or absence of that configuration could be what determines whether this behavior kicks in?

1 Like

Ok. Will design it this way. I’ll probably use an environment variable to define an auto-assign org or something similar.

1 Like

Meanwhile, until this is resolved, which would be the recommended way to manually add users to an organisation?

Hi @yala1, an owner of a organization’s team site should be able to manage users as described here: