Finding your Token Endpoint URL

The token endpoint is the recommended way to connect your Copilot Studio agent to Calibrant. It works with both authenticated and unauthenticated agents and doesn't require any Azure portal access.

This is the recommended connection method for all new Copilot Studio agents. It works regardless of whether your agent has Microsoft authentication enabled.

What is the token endpoint?

Every Copilot Studio agent gets a token endpoint URL when you enable the Native app (or Mobile app) channel. This URL returns a short-lived Direct Line token that Calibrant uses to start test conversations with your agent.

The URL looks like this:

https://defaultXXXXXX.XX.environment.api.powerplatform.com
  /powervirtualagents
  /botsbyschema/cr0f1_yourBotName
  /directline/token?api-version=2022-03-01-preview

How to find it

  1. Go to copilotstudio.microsoft.com and open your agent.
  2. Click Channels in the left sidebar.
  3. Select the Native app (or Mobile app) tile.
  4. Find the Token Endpoint field and click Copy.
If you don't see "Native app (or Mobile app)" under Channels, try looking for Custom websiteinstead — the token endpoint is available from either channel.

How it works

When Calibrant runs an optimization:

  1. Token request — Calibrant sends a GET request to your token endpoint. The endpoint returns a temporary Direct Line token (valid for 1 hour).
  2. Start conversation — Calibrant uses the token to open a Direct Line conversation with your agent.
  3. Send test queries — Test queries from your evaluation suite are sent as messages and responses are collected for scoring.
  4. Token refresh — Tokens are refreshed automatically during long-running optimization runs.

Testing it manually

You can verify the endpoint works with a simple curl command:

curl -s "YOUR_TOKEN_ENDPOINT_URL"

# Expected response:
{
  "token": "RCurR_XV9ZA.cwA...",
  "expires_in": 3600,
  "conversationId": "abc123"
}

A successful response with a token field means the endpoint is working. If you get an error, verify the Native app (or Mobile app) channel is enabled in Copilot Studio.

Authenticated agents

If your agent has Microsoft authentication enabled, the token endpoint still works — the authentication is handled at the conversation level, not the token level. Calibrant uses the Power Platform API context from your M365 connection to authenticate test conversations.

Token endpoint vs Direct Line secret. These are different things. The token endpoint is a URL that generates tokens. A Direct Line secret is a static key from Azure Bot Services. Most new Copilot Studio agents only have a token endpoint, not a Direct Line secret. Compare all methods →

Next steps

With the token endpoint URL, you can register your agent in Calibrant using the "Token Endpoint" connection method.