# Using the API to create a user on an SSO only system

**URL:** https://meta.discourse.org/t/using-the-api-to-create-a-user-on-an-sso-only-system/46184
**Category:** Support
**Created:** [6월 22, 2016, 12:51오후 UTC](https://meta.discourse.org/t/using-the-api-to-create-a-user-on-an-sso-only-system/46184 "2016-06-22T12:51:31Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![DylannCordel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanncordel/32/109596_2.png) [@DylannCordel](https://meta.discourse.org/u/DylannCordel)
#### Post date: [8월 24, 2018, 3:38오후 UTC](https://meta.discourse.org/t/using-the-api-to-create-a-user-on-an-sso-only-system/46184/13 "2018-08-24T15:38:49Z")

</div>

Hi !

@zogstrip Seems we still can’t create new users via API (Forbidden is returned) with those settings:

- SSO activated
- allow new registrations: enabled (to be able to create account via API)
- invite only: enabled (to disable the “register” button on the forum)
- enable local logins: disabled (to only login via the SSO)

But if “enable local logins” is enabled, then it’s possible to create a new user via the API.

@Rana_Muhammad_Ahsan to temporary solve this problem, I send a PUT request to enable “local logins” setting, then a POST to create the user, then a new PUT request to disable “local logins” setting. Pretty much ugly but working 🙈

---

_[View the full topic](https://meta.discourse.org/t/using-the-api-to-create-a-user-on-an-sso-only-system/46184)._
