-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Support mapping groups' IDs to names for Django groups #215
Comments
I've implemented a workaround in my application by subclassing the backend and decided that I'd be better off creating the groups identified in the mapping on |
Hi. This seems reasonable, but normally I’d recommend implementing graph or roles for this purpose then. In other words:
or:
|
I'm a bit hesitant to add another round trip request to my authentication flow. I'll take a look at application roles to see if that'll work better for us. |
That's how we manage things now atleast, using app roles instead of groups. |
@JonasKs I couldn't get app roles to work. It continued to only use the ids. I'm happy to close this issue if the preferred approach is to manually manage it. |
@JonasKs, do you have details on how you've got roles handed back to your Django auth process? I can't seem to see where to add them to the response from AzureAD. Support for groups in the way that @tim-schilling described would be my preferred option (being able to map names to groups instead of/alongside the UUIDs), but App Roles would be a reasonable substitute should there be documentation on how to make it work... |
I haven't used company groups for Azure AD, since we default on ADFS. Groups in Azure AD is not nested, which means if a user is member of |
So the second option we would also like to do, are there any examples? Because we do not seem to find anything in the documentation about this? |
Moving this part of the conversation from #173 to here.
For configurations with only Azure Active Directory, the above means that the group claims will only include the
id
. This results in the group names being UUIDs which aren't reasonably maintainable. To mitigate that, I propose a setting is added that will handle the mapping of id to group name.Setting:
GROUPS_CLAIM_MAPPING
A dictionary of Azure AD Group ID to Django Group Name mappings. When a groups claim contains one of these IDs, the corresponding Django group will be used (and created if needed) using the name from the mapping.
The text was updated successfully, but these errors were encountered: