Attempt to Get Token with ROPG Returns Error "Authorization server not configured with default connection"

Last Updated: Aug 20, 2024

Overview

When trying to obtain a token by making the following request:

curl --request POST
–url ‘https://mydomain.auth0.com/oauth/token’
–header ‘content-type: application/x-www-form-urlencoded’
–data grant_type=password
–data ‘username=###EMAIL###’
–data ‘password=###PASSWORD###’
–data ‘client_id=###CLIENT_ID###’
–data ‘client_secret=###CLIENT_SECRET###’

the below error response is received:

{“error”:“server_error”,“error_description”:“Authorization server not configured with default connection.”}

Applies To

  • Authorization server
  • Default connection
  • ROPG error

Cause

According to this document, the ROPG flow needs the default directory set. If this is set to the active database connection, it should work.

Solution

Alternatively, if there is another connection as the default, there should be the possibility to specify the active db connection this way:

  • Use the password-realm grant type, and then add an additional “realm” property to the call, which should be set to the database connection name that should be used.

Related References

1 Like