Microsoft Entra ID login 'social_core.exceptions.AuthMissingParameter' #11219

Closed
opened 2025-12-29 21:42:05 +01:00 by adam · 1 comment
Owner

Originally created by @mitchplze on GitHub (May 26, 2025).

Deployment Type

NetBox Docker

NetBox Version

4.3.1-Docker-3.3.0

Python Version

3.12.3

Steps to Reproduce

  • Follow the new Entra ID SSO guide for single tenant, add the following to env/netbox.env:
REMOTE_AUTH_BACKEND = 'social_core.backends.azuread.AzureADOAuth2'
SOCIAL_AUTH_AZUREAD_OAUTH2_KEY = '<<clientID>>' 
SOCIAL_AUTH_AZUREAD_OAUTH2_SECRET = '<<clientSecret>>' 
  • Fully restart NetBox Docker (docker compose down; docker compose up -d)
  • Try to login with Entra ID authentication

Expected Behavior

The login should have succeeded and logged me into NetBox with my Entra credentials

Observed Behavior

The following M365 error is displayed after clicking the login w Entra button:

AADSTS700016: Application with identifier 'None' was not found in the directory 'My Company Name Redacted'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.

Troubleshooting

A little while back, Microsoft started requiring unique tenant IDs for OAuth requests, instead of a generic URL.

After reviewing these docs, I tried adding the following to my env/netbox.env file:

SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_TENANT_ID = '<<tenantID>>'

But that did not work either.

I also tried going to the admin consent URL (as a Global Admin): https://login.microsoftonline.com/common/adminconsent?client_id=<<clientID>>, and granting consent to the default read profile, and I receive the following in NetBox:

<class 'social_core.exceptions.AuthMissingParameter'>
Missing needed parameter state
Python version: 3.12.3
NetBox version: 4.3.1-Docker-3.3.0
Plugins: None installed

Originally created by @mitchplze on GitHub (May 26, 2025). ### Deployment Type NetBox Docker ### NetBox Version 4.3.1-Docker-3.3.0 ### Python Version 3.12.3 ### Steps to Reproduce - Follow the new [Entra ID SSO guide](https://netboxlabs.com/docs/netbox/administration/authentication/microsoft-entra-id/) for single tenant, add the following to `env/netbox.env`: ```yaml REMOTE_AUTH_BACKEND = 'social_core.backends.azuread.AzureADOAuth2' SOCIAL_AUTH_AZUREAD_OAUTH2_KEY = '<<clientID>>' SOCIAL_AUTH_AZUREAD_OAUTH2_SECRET = '<<clientSecret>>' ``` - Fully restart NetBox Docker (`docker compose down; docker compose up -d`) - Try to login with Entra ID authentication ### Expected Behavior The login should have succeeded and logged me into NetBox with my Entra credentials ### Observed Behavior The following M365 error is displayed after clicking the login w Entra button: > AADSTS700016: Application with identifier 'None' was not found in the directory 'My Company Name Redacted'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant. ### Troubleshooting A little while back, Microsoft started requiring unique tenant IDs for OAuth requests, instead of a generic URL. After reviewing [these docs](https://python-social-auth.readthedocs.io/en/latest/backends/azuread.html#tenant-support), I tried adding the following to my `env/netbox.env` file: `SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_TENANT_ID = '<<tenantID>>'` But that did not work either. I also tried going to the admin consent URL (as a Global Admin): `https://login.microsoftonline.com/common/adminconsent?client_id=<<clientID>>`, and granting consent to the default read profile, and I receive the following in NetBox: > <class 'social_core.exceptions.AuthMissingParameter'> > Missing needed parameter state > Python version: 3.12.3 > NetBox version: 4.3.1-Docker-3.3.0 > Plugins: None installed
adam added the netbox label 2025-12-29 21:42:05 +01:00
adam closed this issue 2025-12-29 21:42:05 +01:00
Author
Owner

@mitchplze commented on GitHub (May 26, 2025):

Okay, so if I put the Entra ID config directly into configuration/configuration.py it seems to work, but not when using the Docker .env file as anticipated. Perhaps this is my failing, and this is not actually a bug.

@mitchplze commented on GitHub (May 26, 2025): Okay, so if I put the Entra ID config _directly_ into `configuration/configuration.py` it seems to work, but not when using the Docker `.env` file as anticipated. Perhaps this is my failing, and this is not actually a bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11219