Configure user authentication for tools

When you create a tool for an agent, you can require user authentication or provide a set of credentials for the agent to use on behalf of the user.

  • Select Agent author authentication if access to the service associated with the tool is implicit, or for low-risk use cases. For example, use this authentication setting to find the phone number for the support team for a given postal code. Another use case could be using a weather API to get the current forecast.
  • Select User authentication if you must restrict data access to specific groups or individuals in the user community. For example, use this authentication setting if the agent is meant to retrieve data that only the user has access to, or to perform work on their behalf.

Connect to a service during a conversation

When an agent calls a tool that uses User authentication, Copilot Studio checks whether the user has a valid connection to the service. If a valid connection is available, the agent uses it. Otherwise, the agent displays a connection card for the service required by the tool.

To create the connection, the user selects Connect and completes any required sign-in or consent steps in a separate window. The connection request is for the service required by the current tool call.

After the connection succeeds, the window closes and the agent retries the tool automatically. If Copilot Studio can't confirm the connection or continue the tool call, the card displays Connection failed and Try again. The user can select Try again to refresh the connection status and retry the tool.

If you host a custom chat canvas for an agent powered by the standard harness, implement the connection popup and continuation handling. Learn more in Support connection setup in a custom canvas.

Data access and permission management

Copilot Studio doesn't store any credentials. Agents prompt users to reconnect when an access token expires or is revoked by the service. Users can also access the connection management page to refresh or revoke permissions.

Supported channels

The following table lists the channels that support user authentication for tools.

Channel Supported
Azure Bot Service channels Not supported
Custom Website Supported
Demo Website Not supported
Facebook Not supported
Microsoft Teams1 Supported
Mobile App Not supported
Omnichannel for Customer Service2 Supported
SharePoint1 Supported

1 If you also use the Teams channel, follow the instructions in Configure single sign-on with Microsoft Entra ID for agents in Teams. Otherwise, authentication always fails for users in Teams.

2 Only the live chat channel is supported. Learn more in Configure handoff to Dynamics 365 Customer Service.