Parameter organization is required for this client issue with django + Azure AD

I’m trying get users in Azure AD to connect my Django application.
I’m using an Organization in Auth0 with a connection to Azure AD that seems to be working (Auth0 tells me it works when I click the pretty cool Try button.
However, when I try to connect to the login page of the application I get the following error: Authentication failed: parameter organization is required for this client

I can see it raised as an exception in my application as well as in the logs in Auth0.
I’m not sure of even which systems is raising the issue. Is it the Django app sending or receiving the right info, is it Auth0 being miss-configured or it is my setup of the Azure AD not being correct.

Here is the log I get from Auth0.

{
  "date": "2021-09-22T14:23:44.251Z",
  "type": "f",
  "description": "parameter organization is required for this client",
  "connection_id": "",
  "client_id": "---------------------",
  "client_name": "my app",
  "ip": "1.1.1.1",
  "user_agent": "Firefox 92.0.0 / Ubuntu 0.0.0",
  "details": {
    "body": {},
    "qs": {
      "client_id": "-----------------------",
      "redirect_uri": "http://localhost:8000/complete/auth0",
      "state": "---------------------",
      "response_type": "code",
      "scope": "openid email"
    },
    "error": {
      "message": "parameter organization is required for this client",
      "oauthError": "invalid_request",
      "type": "request-error"
    },
    "session_id": "--------------------"
  },
  "hostname": "my-tenant.region.auth0.com",
  "user_id": "---------------------",
  "user_name": "my@username.com",
  "log_id": "--------------------------",
  "_id": "-------------------",
  "isMobile": false
}

Would anyone had any idea.
Thanks for your help.


Ludo

1 Like