dashboard change log: second name appears twice #9134

Closed
opened 2025-12-29 20:46:05 +01:00 by adam · 5 comments
Owner

Originally created by @fansari on GitHub (Jan 23, 2024).

Deployment Type

Self-hosted

NetBox Version

v3.7.1

Python Version

3.11

Steps to Reproduce

  1. Login using SSO with authentik.
  2. Check entries in the "Change Log" widget from the dashboard.

Expected Behavior

In the "Change Log" widget names in column "Full Name" should be "first name last name".

Observed Behavior

After updating to 3.7.1 (I use the docker version) I noticed that in all "Change Log" entries my surname appears twice ("Frank Ansari Ansari" instead of "Frank Ansari") in "Full Name".

Originally created by @fansari on GitHub (Jan 23, 2024). ### Deployment Type Self-hosted ### NetBox Version v3.7.1 ### Python Version 3.11 ### Steps to Reproduce 1. Login using SSO with authentik. 2. Check entries in the "Change Log" widget from the dashboard. ### Expected Behavior In the "Change Log" widget names in column "Full Name" should be "first name last name". ### Observed Behavior After updating to 3.7.1 (I use the docker version) I noticed that in all "Change Log" entries my surname appears twice ("Frank Ansari Ansari" instead of "Frank Ansari") in "Full Name".
adam closed this issue 2025-12-29 20:46:06 +01:00
Author
Owner

@abhi1693 commented on GitHub (Jan 23, 2024):

Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v3.7.1. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.

@abhi1693 commented on GitHub (Jan 23, 2024): Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v3.7.1. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.
Author
Owner

@jeremystretch commented on GitHub (Jan 23, 2024):

  1. Login using SSO with authentik.

This is likely due to a misconfiguration of your SSO provider. Note that a user's first and last names are displayed as expected when using a locally-defined account.

@jeremystretch commented on GitHub (Jan 23, 2024): > 1. Login using SSO with authentik. This is likely due to a misconfiguration of your SSO provider. Note that a user's first and last names are displayed as expected when using a locally-defined account.
Author
Owner

@fansari commented on GitHub (Jan 25, 2024):

In authentik when I click on "Settings" and check the "Name" field I see "Frank Ansari".

Also I added a local user in Netbox for testing. I can confirm that in this case the name is displayed correctly.

But I noticed that in Netbox first name is "Frank Ansari". I can overwrite this to "Frank". Then in change log my name is displayed correctly. But when I relogin the SSO it is overwritten again.

I found a workaround: when I remove firstname and lastname in Netbox and relogin the full name of authentik goes into the first name of Netbox and the last name stays empty. So the name is displayed correctly but of course this also is not correct.

The root cause of this issue seems to be that in authentik there is no "first name" / "last name" concept but only "name".

@fansari commented on GitHub (Jan 25, 2024): In authentik when I click on "Settings" and check the "Name" field I see "Frank Ansari". Also I added a local user in Netbox for testing. I can confirm that in this case the name is displayed correctly. But I noticed that in Netbox first name is "Frank Ansari". I can overwrite this to "Frank". Then in change log my name is displayed correctly. But when I relogin the SSO it is overwritten again. I found a workaround: when I remove firstname and lastname in Netbox and relogin the full name of authentik goes into the first name of Netbox and the last name stays empty. So the name is displayed correctly but of course this also is not correct. The root cause of this issue seems to be that in authentik there is no "first name" / "last name" concept but only "name".
Author
Owner

@jeremystretch commented on GitHub (Jan 25, 2024):

I'm not sure how the first/last name are being defined in your setup currently; it doesn't seem like they get set by default. But you should be able to customize the authentication pipeline (by defining SOCIAL_AUTH_PIPELINE in your NetBox config) to override the default logic and set a user's first & last name directly.

Going to close this out as NetBox itself doesn't prescribe any particular logic for this.

@jeremystretch commented on GitHub (Jan 25, 2024): I'm not sure how the first/last name are being defined in your setup currently; it doesn't _seem_ like they get set by default. But you should be able to customize the [authentication pipeline](https://python-social-auth.readthedocs.io/en/latest/pipeline.html#authentication-pipeline) (by defining `SOCIAL_AUTH_PIPELINE` in your NetBox config) to override the default logic and set a user's first & last name directly. Going to close this out as NetBox itself doesn't prescribe any particular logic for this.
Author
Owner

@fansari commented on GitHub (Jan 25, 2024):

I have now copied this default SOCIAL_AUTH_PIPELINE into my config and just disabled this:

# Update the user record with any changed info from the auth service.
### disabled here because authentik writes the full name into
### the first name field of Netbox
#    'social_core.pipeline.user.user_details',
@fansari commented on GitHub (Jan 25, 2024): I have now copied this default SOCIAL_AUTH_PIPELINE into my config and just disabled this: ``` # Update the user record with any changed info from the auth service. ### disabled here because authentik writes the full name into ### the first name field of Netbox # 'social_core.pipeline.user.user_details', ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9134