Directory

Connect the directory

directory_connect · Changes data · Markdown

Connects the company's Microsoft Entra ID or Okta, checked by reading one person.

$0.001 a call

From your agent’s balance. A call that fails costs nothing.

An example

Connect our Okta at hansenvoss.okta.com so you can set up new hires.

Your agent callsdirectory_connect$0.001 a call

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "provider": "okta",
  "org_url": "https://hansenvoss.okta.com"
}
What comes back
{
  "link": "https://conecto.chat/api/bots/connect/7nyHVbrVtNl-F6ed-Iq9numJyoPAj4Pw5T7CML5U3zg",
  "expires_in_minutes": 60,
  "tell_the_owner": "Open this link within the hour, sign in to Conecto and type an Okta admin's API token there. It goes to Conecto only; I never see it.",
  "from_a_terminal": "npx @conecto-chat/cli@latest run directory_connect -i '{\"provider\": \"okta\", \"org_url\": \"https://hansenvoss.okta.com\"}' -s secret",
  "from_a_terminal_with_curl": "printf %s 'API token: '; read -rs v1; echo; curl -sS -H \"Authorization: Bearer $CONECTO_KEY\" --data-urlencode secret@<(printf %s \"$v1\") https://conecto.chat/api/bots/connect/7nyHVbrVtNl-F6ed-Iq9numJyoPAj4Pw5T7CML5U3zg; unset v1",
  "next": "When the owner types it on the link, account.credential_added (account_events) says so, with what directory_connect answered."
}

Use it when

The business wants joiners and leavers handled in its directory.

What it does

Connect the company's Microsoft Entra ID or Okta. Entra ID: tenant_id, client_id and the client secret of an app registration with User.ReadWrite.All and GroupMember.ReadWrite.All (and User.EnableDisableAccount.All), consented by the tenant's admin. Okta: org_url and an admin's API token. Called without secret, it answers with a link for the owner, who types it on a Conecto page, so it never passes through the chat (from_a_terminal does the same from a terminal); account.credential_added says when it is connected, and the link costs nothing. The connection is checked by reading one person. Suspensions then wait for the owner's approval by default.

What comes back

Without secret: link, a page where the owner or an admin, signed in, types the API token or client secret, with expires_in_minutes, tell_the_owner, from_a_terminal (the CLI), from_a_terminal_with_curl and next. With secret: directory, the provider, the tenant or org and when it was connected; suspensions_need_approval when an approval rule for suspensions was made. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
providerRequiredstringOne of: entra,okta.
tenant_idstringUp to 120 characters.
client_idstringUp to 120 characters.
org_urlstringUp to 200 characters.
secretstringThe Entra client secret or the Okta API token. Never shown again. Leave it out to get the link instead. 8 to 2,000 characters.

The call

Over MCP, call directory_connect on https://api.conecto.chat/mcp/directory. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/directory_connect \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider":"okta","org_url":"https://hansenvoss.okta.com"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
invalid_input400Entra ID was given without tenant_id or client_id, or org_url is not an Okta org.Give what the message names.
directory_rejected502The directory refused, usually because a permission is missing.Ask its admin to grant what the message names.
directory_unavailable503The directory could not be reached.Try again in a minute; nothing changed.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md