-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using AzureAD authentication I cannot get the group members for the user that authenticates #11508
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide. |
Neither the NetBox documentation nor the documentation for the upstream python-social-auth package suggests that this functionality exists. This should have been submitted as a feature request. I'm marking this as |
I tried to do it for Keycloak, and it broke things badly. Here's a potted history in case it helps. In python-social-auth/social-core#668, in an attempt to be helpful I also picked up the "groups" claim and returned it in the user structure from all OIDC responses:
But it turns out that if you do this, Django barfs, and this change had to be rolled back: see python-social-auth/social-core#690 / python-social-auth/social-core#692 The actual error from Django is:
If you can work out where that's coming from, you may be able to fix this issue. There's a full backtrace at #8579 (comment) |
Thanks @candlerb, that's very helpful. I suspected that this sort of change would be necessary so it's nice to have that confirmed.
I assume that the dictionary of attributes returned by the backend is being applied to the user instance blindly. |
Hi, just in case that helps, the workaround I found was not using AzureAD but SAML against AzureAD and store groups in SOCIAL_AUTH_SAML_EXTRA_DATA to use them with a custom pipeline. Might be considered as "dirty" (and the code far from perfect) |
There's now a feature request to implement this ability natively within |
Hi All, I noticed PR #13373 was reverted. |
Good morning, |
NetBox version
v3.3.8
Python version
3.9
Steps to Reproduce
Expected Behavior
The expected behaviour would be to see the member groups related to the user that is authenticated using AzureAD
Observed Behavior
No groups appeared related to the user.
My configurations related with authentication is:
REMOTE_AUTH_BACKEND = 'social_core.backends.azuread.AzureADOAuth2'
SOCIAL_AUTH_AZUREAD_OAUTH2_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
SOCIAL_AUTH_AZUREAD_OAUTH2_SECRET = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
SOCIAL_AUTH_REDIRECT_IS_HTTPS = True
The text was updated successfully, but these errors were encountered: