The rename of SSO from Microsoft Azure AD to Entra ID doesn't work as expected #10371

Closed
opened 2025-12-29 21:30:34 +01:00 by adam · 8 comments
Owner

Originally created by @lucafabbri365 on GitHub (Oct 16, 2024).

Originally assigned to: @alehaa on GitHub.

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.1.4

Python Version

3.10

Steps to Reproduce

Update from NetBox v4.1.1 to v4.1.4 (SSO with Entra ID enabled)

Expected Behavior

According to the #15829, the new label Microsoft Entra ID was expected when SSO with Entra ID is enabled on NetBox.

Observed Behavior

The login screen doesn't show the Microsoft Entra ID label

image

The link associated to SSO button is .../oauth/login/azuread-oauth2/?next=%2F. With reference to doc Microsoft Entra ID, if I change the Redirect URI (Azure App Registrations) from /oauth/complete/azuread-oauth2/ to /oauth/complete/entraid-oauth2/. login doesn't work anymore.

Originally created by @lucafabbri365 on GitHub (Oct 16, 2024). Originally assigned to: @alehaa on GitHub. ### Deployment Type Self-hosted ### Triage priority N/A ### NetBox Version v4.1.4 ### Python Version 3.10 ### Steps to Reproduce Update from NetBox v4.1.1 to v4.1.4 (SSO with Entra ID enabled) ### Expected Behavior According to the #15829, the new label **Microsoft Entra ID** was expected when SSO with Entra ID is enabled on NetBox. ### Observed Behavior The login screen doesn't show the **Microsoft Entra ID** label ![image](https://github.com/user-attachments/assets/aa81e8ba-ab96-447b-af56-0e15ee5d33f1) The link associated to SSO button is `.../oauth/login/azuread-oauth2/?next=%2F`. With reference to doc [Microsoft Entra ID](https://github.com/netbox-community/netbox/blob/develop/docs/administration/authentication/microsoft-entra-id.md), if I change the _Redirect URI_ (Azure App Registrations) from `/oauth/complete/azuread-oauth2/` to `/oauth/complete/entraid-oauth2/`. login doesn't work anymore.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:30:34 +01:00
adam closed this issue 2025-12-29 21:30:34 +01:00
Author
Owner

@arthanson commented on GitHub (Oct 16, 2024):

@alehaa can you please check this if this is occurring on your setup as you worked on the change for this? I don't have Azure setup to see if this is correct.

@arthanson commented on GitHub (Oct 16, 2024): @alehaa can you please check this if this is occurring on your setup as you worked on the change for this? I don't have Azure setup to see if this is correct.
Author
Owner

@florianschendel commented on GitHub (Oct 17, 2024):

Hi,
same issue. Netbox is running on-prem in our Kubernetes Cluster.
I did only the upgrade from 4.1.3 to 4.1.4 with activate Entrad-ID SSO.
Now it shows "azuread-oauth2" on the button as in the sreesnhot or @lucafabbri365.

I changed nothing on our configuration, login is still possible with the old Redirect URI "azuread-oauth2".

@florianschendel commented on GitHub (Oct 17, 2024): Hi, same issue. Netbox is running on-prem in our Kubernetes Cluster. I did only the upgrade from 4.1.3 to 4.1.4 with activate Entrad-ID SSO. Now it shows "azuread-oauth2" on the button as in the sreesnhot or @lucafabbri365. I changed nothing on our configuration, login is still **possible** with the old Redirect URI "azuread-oauth2".
Author
Owner

@rock7632 commented on GitHub (Oct 17, 2024):

I'm getting the same issue after updating to 4.1.4

@rock7632 commented on GitHub (Oct 17, 2024): I'm getting the same issue after updating to 4.1.4
Author
Owner

@alehaa commented on GitHub (Oct 17, 2024):

@arthanson I‘m not a customer of Azure as well. I just did the renaming as suggested in #15829.

@jeremystretch maybe we can revert the changes to get the users back online?

@alehaa commented on GitHub (Oct 17, 2024): @arthanson I‘m not a customer of Azure as well. I just did the renaming as suggested in #15829. @jeremystretch maybe we can revert the changes to get the users back online?
Author
Owner

@alehaa commented on GitHub (Oct 17, 2024):

After having a look into the original PR, the one thing that was not cosmetic in #17616 was the rename of keys in netbox/netbox/authentication/init.py. However, python social didn't seem to have their code changed to Entra ID yet.

@lucafabbri365, @florianschendel, @rock7632 can you please check in your deployment, if it helps to rename the dictionary keys back as follows? This should change the deployment back to a working state and just tweak the UI label.

diff --git a/netbox/netbox/authentication/__init__.py b/netbox/netbox/authentication/__init__.py
index 7394f6ded4..f80454f999 100644
--- a/netbox/netbox/authentication/__init__.py
+++ b/netbox/netbox/authentication/__init__.py
@@ -20,10 +20,10 @@
     'amazon': ('Amazon AWS', 'aws'),
     'apple': ('Apple', 'apple'),
     'auth0': ('Auth0', None),
-    'entraid-oauth2': ('Microsoft Entra ID', 'microsoft'),
-    'entraid-b2c-oauth2': ('Microsoft Entra ID', 'microsoft'),
-    'entraid-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'),
-    'entraid-v2-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'),
+    'azuread-oauth2': ('Microsoft Entra ID', 'microsoft'),
+    'azuread-b2c-oauth2': ('Microsoft Entra ID', 'microsoft'),
+    'azuread-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'),
+    'azuread-v2-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'),
     'bitbucket': ('BitBucket', 'bitbucket'),
     'bitbucket-oauth2': ('BitBucket', 'bitbucket'),
     'digitalocean': ('DigitalOcean', 'digital-ocean'),
@alehaa commented on GitHub (Oct 17, 2024): After having a look into the original PR, the one thing that was not cosmetic in #17616 was the rename of keys in [netbox/netbox/authentication/__init__.py](https://github.com/netbox-community/netbox/pull/17616/files#diff-4aa364a416bd4e5a7232d4a00eb25f321cd5d0b198267c5692b2618a009a7954). However, python social didn't seem to have their code changed to Entra ID yet. @lucafabbri365, @florianschendel, @rock7632 can you please check in your deployment, if it helps to rename the dictionary keys back as follows? This should change the deployment back to a working state and just tweak the UI label. ```diff diff --git a/netbox/netbox/authentication/__init__.py b/netbox/netbox/authentication/__init__.py index 7394f6ded4..f80454f999 100644 --- a/netbox/netbox/authentication/__init__.py +++ b/netbox/netbox/authentication/__init__.py @@ -20,10 +20,10 @@ 'amazon': ('Amazon AWS', 'aws'), 'apple': ('Apple', 'apple'), 'auth0': ('Auth0', None), - 'entraid-oauth2': ('Microsoft Entra ID', 'microsoft'), - 'entraid-b2c-oauth2': ('Microsoft Entra ID', 'microsoft'), - 'entraid-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'), - 'entraid-v2-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'), + 'azuread-oauth2': ('Microsoft Entra ID', 'microsoft'), + 'azuread-b2c-oauth2': ('Microsoft Entra ID', 'microsoft'), + 'azuread-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'), + 'azuread-v2-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'), 'bitbucket': ('BitBucket', 'bitbucket'), 'bitbucket-oauth2': ('BitBucket', 'bitbucket'), 'digitalocean': ('DigitalOcean', 'digital-ocean'), ```
Author
Owner

@lucafabbri365 commented on GitHub (Oct 17, 2024):

Hello @alehaa,
yep: renaming dictionary keys restored label (with new name).

image

Thank you.

@lucafabbri365 commented on GitHub (Oct 17, 2024): Hello @alehaa, yep: renaming dictionary keys restored label (with new name). ![image](https://github.com/user-attachments/assets/c299d29c-00e5-4c64-b1a8-4a0cbe66d8e0) Thank you.
Author
Owner

@alehaa commented on GitHub (Oct 17, 2024):

@lucafabbri365 Thanks for the quick response!

@arthanson can you please assign this to me, so I can push a new PR?

@alehaa commented on GitHub (Oct 17, 2024): @lucafabbri365 Thanks for the quick response! @arthanson can you please assign this to me, so I can push a new PR?
Author
Owner

@arthanson commented on GitHub (Oct 17, 2024):

@alehaa assigned

@arthanson commented on GitHub (Oct 17, 2024): @alehaa assigned
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10371