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

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 :see_no_evil: