Create User with Python when SSO is enabled | XM Community
Skip to main content
I am attempting to learn how to create users through python using the script found here

Our Brand is SSO enabled so the usernames have #brandid appended to them. This is referenced at this support page, but I am not sure what to enter for the password field. The api documentation says password is required but I do not know what I would enter since these users will use SSO.



Would appreciate any guidance here, thank you!
Check this out: https://stackoverflow.com/questions/3854692/generate-password-in-python you will not need the password anyway after the user has been created.
@MsIreen so basically the password I put doesn't matter. Having the #brandid means the users SSO information will be taken and that initial password is irrelevant. Am I understanding that correctly?
@chasemcl yes, it is irrelevant. Even when creating users manually i just generate a random password. The main thing is that the SSO is picking up the correct login.
@MsIreen Thank you!

Run the following command:

  1. $ python manage.py createsuperuser. Enter your desired username and press enter.

  2. Username: admin. You will then be prompted for your desired email address:

  3. Email address: admin@example.com. ...

  4. Password: ********** Password (again): ********* Superuser created successfully.

Regards- Python Training in Pune


Leave a Reply