Auto create users with UPN (mail address) as username in Netbox - Azure AD SSO - Python Social Auth #928
Unanswered
Dark-DK
asked this question in
Getting Help
Replies: 1 comment
-
Hi @Dark-DK, I'm facing the same issue. Were you able to get it working? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all
First things first; I'm running NetBox in docker and running v3.4.2.
Azure AD SSO is working just fine using Python Social Auth and auto creation of users is also working perfectly.
I suspect that I'm having these issues to the it being run from Docker.
However I would like to change it so that it will auto-create users with their e-mail address as the username instead of the default (name without spaces).
I've found this which indicated to do just that - however it is a rather old one:
https://gist.github.com/nahun/5d4d715ca37a2465aaf59ab152413dc2
It seems that one must change the default SOCIAL_AUTH_PIPELINE, but I cannot figure out how to make the stuff from the file "custom_pipeline.py" make it's way to the docker instance and work.
I've tried to put it into my own file that I've created in the configuration/ folder
This is what I've come up with in my own .py file:
For the above I get the following error:
Exception Value: not enough values to unpack (expected 2, got 1)
I believe my issue is that I do not know how to properly make the function "set_username" and call it correctly from the Social Auth Pipeline.
Any and all help will be much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions