# New users via API if allow new unchecked

**URL:** https://meta.discourse.org/t/new-users-via-api-if-allow-new-unchecked/75103
**Category:** Development
**Created:** [November 30, 2017, 6:10pm UTC](https://meta.discourse.org/t/new-users-via-api-if-allow-new-unchecked/75103 "2017-11-30T18:10:08Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![naomi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/naomi/32/120507_2.png) [@naomi](https://meta.discourse.org/u/naomi)
#### Post date: [December 1, 2017, 6:19pm UTC](https://meta.discourse.org/t/new-users-via-api-if-allow-new-unchecked/75103/8 "2017-12-01T18:19:15Z")

</div>

I have SSO as well 🙂 You asked about creating new users via an API call, though, without having just anyone able to create an account. And in that case, you should try my solution.

> [@Martyr2](#):
>
> I don’t want invite buttons to pop up everywhere or our support admins to think they need to invite people

Invite buttons don’t show when SSO is enabled ([Source](https://meta.discourse.org/t/sso-and-invites/40008/2)).

> [@Martyr2](#):
>
> I guess ultimately all I am looking to do is have an SSO implementation (as we have now) with the option to push user accounts into discourse when they sign up or login on the main site

If you have SSO, you don’t need to create users via the API as a correct SSO implementation does it for you ([Source](https://github.com/discourse/discourse/blob/master/app/models/discourse_single_sign_on.rb)).

> [@Martyr2](#):
>
> I don’t want them to leave our main site and go to the discourse site and hit “sign in” to have that information “sucked” over and created in discourse.

When you use a separate site as the SSO provider, Discourse will know if they are already logged in and won’t prompt them to sign in again

Here’s one of the resources I used for learning more about how SSO works:

> [@Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso)](https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045):
>
> [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) is a core Discourse feature that allows you to configure “Single Sign-On (SSO)” to completely outsource all user registration and login from Discourse to another site. Offered to our [pro, business and enterprise hosting customers](https://discourse.org/pricing). information_source (Feb 2021) ‘[Discourse SSO](https://meta.discourse.org/t/13045?silent=true)’ is now ‘[DiscourseConnect](https://meta.discourse.org/t/13045?silent=true)’. If you are running an old version of Discourse, the settings below will be named sso\_... rather than discourse\_connect\_... The Problem Many sites wishing to integrate wit…

> [@Martyr2](#):
>
> Does anyone else think that allow new registrations with invite only would work in SSO?

Why not just try it and see if it works for you? 🙂

---

_[View the full topic](https://meta.discourse.org/t/new-users-via-api-if-allow-new-unchecked/75103)._
