Create User with Python when SSO is enabled | Experience Community
Skip to main content
Solved

Create User with Python when SSO is enabled

  • Feb 25, 2020 6:15 PM UTC
  • 5 replies
  • 142 views

Forum|alt.badge.img+3
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!

Best answer by MsIreen

@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.
View original

5 replies

MsIreen
Level 5 ●●●●●
Forum|alt.badge.img+23
  • Level 5 ●●●●●
  • Feb 26, 2020 7:19 PM UTC
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.

Forum|alt.badge.img+3
  • Author
  • Level 2 ●●
  • Feb 26, 2020 7:40 PM UTC
@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?

MsIreen
Level 5 ●●●●●
Forum|alt.badge.img+23
  • Level 5 ●●●●●
  • Answer
  • Feb 26, 2020 8:01 PM UTC
@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.

Forum|alt.badge.img+3
  • Author
  • Level 2 ●●
  • Feb 26, 2020 9:03 PM UTC
@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