Skip to content
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

Custom property mapping sync error but still works #12851

Open
CL107 opened this issue Jan 27, 2025 · 0 comments
Open

Custom property mapping sync error but still works #12851

CL107 opened this issue Jan 27, 2025 · 0 comments

Comments

@CL107
Copy link

CL107 commented Jan 27, 2025

I have a custom property mapping for active directory used to map the UPN to the username. I also use a regex match to remove the domain on the end. This works and the users sync correctly, however the sync throws an error anyway:

Traceback (most recent call last): File "/authentik/sources/ldap/tasks.py", line 127, in ldap_sync count = sync_inst.sync(page) ^^^^^^^^^^^^^^^^^^^^ File "/authentik/sources/ldap/sync/groups.py", line 95, in sync raise StopSync(exc, None, exc.mapping) from exc authentik.lib.sync.outgoing.exceptions.StopSync: (PropertyMappingExpressionException(), None, <LDAPSourcePropertyMapping: AD UPN -> Username>)

This is my property mapping:

return {
    "username": regex_replace(ldap.get("userPrincipalName"), '@.*', ''),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant