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.
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-previewHow to find it
- Go to copilotstudio.microsoft.com and open your agent.
- Click Channels in the left sidebar.
- Select the Native app (or Mobile app) tile.
- Find the Token Endpoint field and click Copy.
How it works
When Calibrant runs an optimization:
- Token request — Calibrant sends a
GETrequest to your token endpoint. The endpoint returns a temporary Direct Line token (valid for 1 hour). - Start conversation — Calibrant uses the token to open a Direct Line conversation with your agent.
- Send test queries — Test queries from your evaluation suite are sent as messages and responses are collected for scoring.
- 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.
Next steps
With the token endpoint URL, you can register your agent in Calibrant using the "Token Endpoint" connection method.