How to import pre-sso discourse users?

AI-generated summary

The discussion revolves around importing pre-SSO users into Discourse. michaelr524 asks how to convert an existing admin user to an SSO user. Falco suggests using the same email that SSO will send. fefrei clarifies that there’s no distinction between SSO and regular users—only the external ID matters. Discourse matches users by external ID or email upon login. John_Lehmann confirms that bulk-inviting users with their primary site emails is safe, as Discourse will match them upon SSO activation, provided email validation is enabled fefrei.

Hi,

I have the admin user which was created before discourse was set to use SSO.
How could I possibly “convert” it to an SSO user?

Thanks,
Michael

Just use the same email that SSO is going to send to Discourse.

To clarify: There is no difference between “SSO users” and “regular users”.

The only difference is in whether Discourse knows the external id of the user. When logging in a users, Discourse proceeds like this:

  1. Do I know a user with this external id? If so, log him in, and possibly update his email.
  2. Otherwise, do I know a user with this email? If so, remember his external id, and log him in.
  3. Otherwise, create a new account.

This is very helpful. I am starting a discourse site and am wanting to use SSO but I’d like to defer it for a while longer – but want to make sure I won’t have any problems switching over to it.

My plan is to bulk invite users using the email address that my primary site uses, and then later what I hear @fefrei saying is that when I turn SSO on, I shouldn’t have any problems.

Does that sound correct? Thanks!

This is still correct and Discourse matches the users up the first time they sign in, unless your site does not validate email addresses (and reports this to Discourse).