Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
When you integrate Azure SQL tables as a knowledge source, you ground your agent in the structured data stored in your Azure SQL database. Your agent can answer questions by reading from the tables you select, using the connection credentials and permissions available to the maker.
Note
To add Azure SQL tables as a knowledge source, you must have permission to access the underlying database and tables. Missing or insufficient permissions might prevent servers, databases, or tables from being visible or selectable during setup.
Prerequisites
An Azure SQL Database or Azure SQL Managed Instance that your organization can reach from Power Platform.
Credentials that can connect to the database and read the tables you plan to add (for example, Microsoft Entra ID or SQL authentication, depending on how your connection is configured).
Access to Copilot Studio and permission to edit the agent.
Network access configured so Power Platform can reach your Azure SQL server. For example, firewall rules that allow Azure services, or private connectivity as required by your organization.
Permissions and authentication
Azure SQL knowledge uses the Power Platform SQL connection you create or select during setup. At runtime, the agent relies on the agent user’s Microsoft authentication and the access granted through that connection path.
Users only receive answers based on data the maker can access through the maker's configured connection and database permissions.
If tables don’t appear during setup, verify the connection succeeds outside Copilot Studio and that the account can list and read those tables.
Prepare your Azure SQL database
Copilot Studio agents support Azure SQL databases or SQL Server. Before you add tables, ensure your tables have the following configuration:
- Clear column names, while also avoiding cryptic abbreviations. For example, use
CustomerNamerather thanCustNm. - Primary keys defined for each table. The agent uses primary keys to identify rows and return results.
- Descriptive data, which helps the agent understand the context of the data and answer questions more accurately. For example, use
OrderDaterather thanDate1.
Add Azure SQL tables to your agent
To add Azure SQL tables as a knowledge source, complete the following steps:
Open your Copilot Studio agent.
Select the Build tab.
In the components panel, select Knowledge.
In the Add knowledge dialog, select Azure SQL (or SQL Server, depending on the label shown in your environment).
Create or select a connection to your Azure SQL database:
If you don't already have a connection, select Create new connection (or Add connection).
Enter the server name and database name for your Azure SQL resource.
Choose the authentication type required by your organization, sign in or provide credentials, and create the connection.
If a connection already exists, select it from the list and continue.
Locate one or more tables to add. Use the search field to narrow the list if needed, and then select the tables you want the agent to use.
Note
Only add tables the agent needs to answer user questions. Use well-named tables with clear column names so the agent can interpret the data more reliably.
Review the knowledge name and description. Provide a detailed description, since the description aids the agent orchestration and helps the agent understand the context of the knowledge source.
Select Add to agent to finish adding the knowledge source.
After you add the knowledge source
After you add Azure SQL:
Confirm the knowledge source appears on the agent’s Knowledge page with the connection and selected tables you chose.
Publish the agent so the knowledge source is available in the published experience.
Test your agent with questions that should be answered from the selected tables. For example, "Show me the top five customers by total sales last month." If the results returned are empty or incorrect, ensure that the table contains the expected data, and that the query aligns with your schema.
Tip
Create a diagnostic view in Azure SQL that returns a small, known dataset. Use this dataset to confirm that the connection works before you use production tables.
Improve answer quality
Clear naming and descriptions help the agent understand when and how to use your Azure SQL data.
Use a specific knowledge source name that reflects the business domain (for example, “Customer orders – Azure SQL”) rather than a generic label.
Write a detailed description that explains what data the tables contain, which business questions they answer, and any important filters or relationships.
Select only relevant tables. Extra tables can dilute grounding and make it harder for the agent to choose the right data.
Prefer readable schema. Tables and columns with business-friendly names generally produce better responses than opaque technical names.
Example description
The following example shows the kind of description that helps generative orchestration select the right knowledge source:
Azure SQL knowledge for Contoso order management. Includes Customers, Orders, and OrderLines tables. Use this source for questions about order status, order history, customer purchases, product quantities ordered, and revenue by customer or date. Don't use for inventory on-hand or shipping carrier tracking.