"connection is disabled" when creating a user

I’m trying to automate:

  • creating a client
  • creating a connection to an email / password database, with only this client enabled
  • creating a user in this database

I create a non-interactive client, get a management api token for this client, and use this token to create the client and connection.

In particular, for the connection, enabled_clients is a list of only the client_id of the client created in the first step (NOT the non interactive client.)

I have two problems:

  • The client is associated to all connections in my tenant. Is there a way to disable that ?
  • When I try creating a user, I get an error with message:

connection is disabled (client_id: NI_CLIENT_ID, connection: CONNECTION_NAME)

The only way to create a user is if the connection is also enabled for the NI client.
But it does not make sense (and It seems the user is not created in the right database)

What am I missing ?
What should I do to enable the connection (and only this connection) for the client ?

1 Like

When you create a connection, you can set the especific clients you want to enable using the parameter: “enabled_clients” and setting an array of the identifiers (ID) of the clients:

“enabled_clients”:

  "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM",
  "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb"
]

If the client is already asociated with all your connections, you can update your connections to only enable the clients that you want, using this endpoint:

The error “connection is disabled” happens when you don’t have any client enabled in your connection, so, before creating a user, you’ll have to enable a client in the connection and then create a user.

Hi.

as I wrote in my question, I’m already specifying the enabled_clients for my connection, but I can not create a user unless the connection is also enabled for the “non interactive” client (which is not what I want to do.)

I also don’t understand why my client gets enabled for other connections.

Any idea ?

I don’t get it :smiley: haha where do you put this array? What are these ids? I have enabled Google, and “Try” works fine, yet when I try to authenticate in my app it fails, (it’s enabled in the “Clients” tab). Any tips?

I had to enable the in-built “API Explorer Client” to use my new connection before I could create users in the database that used it.

1 Like