Skip to content
Discussion options

You must be logged in to vote

For anyone else that may run into a similar issue

Using the group attribute override just did not seem to work reliably no matter what I tried.

I ended up creating a custom property mapping (Scope Mapping) and adding that as a scope of the provider using a new header instead of trying to override Authentil's X-Authentik-Email header and it seems to work much better. Even this did not really work until I restarted AUthentik. YMMV.

# Check if user is in a specific group
user_email = request.user.email
for group in request.user.ak_groups.all():
    if group.name == "<my special group>":
        user_email = "<common email>"
        break

# Default behavior for everyone else
return {
    "ak…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pelaxa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant