Skip to content

Commit 1319179

Browse files
committed
Readme
1 parent 519796b commit 1319179

File tree

2 files changed

+68
-3
lines changed

2 files changed

+68
-3
lines changed

dotnet/samples/GettingStartedWithAgents/CopilotStudioAgent/Step03_CopilotStudioAgent_WebSearch.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ namespace GettingStarted.CopilotStudioAgents;
1111
/// Demonstrates how to use a Copilot Studio Agent with a persistent conversation thread
1212
/// to perform web search queries and retrieve responses in a .NET test scenario.
1313
/// </summary>
14+
/// <remarks>
15+
/// In Copilot Studio, for the specified agent, you must enable the "Web Search" capability.
16+
/// If not already enabled, make sure to(re-)publish the agent so the changes take effect.
17+
/// </remarks>
1418
public sealed class Step03_CopilotStudioAgent_WebSearch(ITestOutputHelper output) : BaseAgentsTest(output)
1519
{
1620
[Fact]
Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,67 @@
1-
# Copilot Studio Agents in Semantic Kernel
1+
# Semantic Kernel - CopilotStudioAgent Quickstart
22

3-
## Overview
3+
This README provides an overview on how to use the `CopilotStudioAgent` within Semantic Kernel.
4+
This agent allows you to interact with Microsoft Copilot Studio agents through programmatic APIs.
45

5-
// %%% TODO
6+
> ℹ️ **Note:** Knowledge sources must be configured **within** Microsoft Copilot Studio first. Streaming responses are **not currently supported**.
67
8+
---
9+
10+
## 🔧 Prerequisites
11+
12+
2. Install `Microsoft.SemanticKernel.Agents.CopilotStudio` package:
13+
```bash
14+
dotnet add package Microsoft.SemanticKernel.Agents.CopilotStudio --prerelease
15+
```
16+
3. An agent created in **Microsoft Copilot Studio**
17+
4. Ability to create an application identity in Azure for a **Public Client/Native App Registration**,
18+
or access to an existing app registration with the `CopilotStudio.Copilots.Invoke` API permission assigned.
19+
20+
## Create a Copilot Agent in Copilot Studio
21+
22+
1. Go to [Microsoft Copilot Studio](https://copilotstudio.microsoft.com).
23+
2. Create a new **Agent**.
24+
3. Publish your newly created Agent.
25+
4. In Copilot Studio, navigate to:
26+
`Settings``Advanced``Metadata`
27+
28+
Save the following values:
29+
- `Schema Name` (maps to `agent_identifier`)
30+
- `Environment ID`
31+
32+
## Create an Application Registration in Entra ID – User Interactive Login
33+
34+
> This step requires permissions to create application identities in your Azure tenant.
35+
36+
You will create a **Native Client Application Identity** (no client secret required).
37+
38+
1. Open [Azure Portal](https://portal.azure.com)
39+
2. Navigate to **Entra ID**
40+
3. Go to **App registrations****New registration**
41+
4. Fill out:
42+
- **Name**: Any name you like
43+
- **Supported account types**: `Accounts in this organization directory only`
44+
- **Redirect URI**:
45+
- Platform: `Public client/native (mobile & desktop)`
46+
- URI: `http://localhost`
47+
5. Click **Register**
48+
6. From the **Overview** page, note:
49+
- `Application (client) ID`
50+
- `Directory (tenant) ID`
51+
7. Go to: `Manage``API permissions`
52+
- Click **Add permission**
53+
- Choose **APIs my organization uses**
54+
- Search for: **Power Platform API**
55+
56+
If it's not listed, see **Tip** below.
57+
58+
8. Choose:
59+
- **Delegated Permissions**
60+
- Expand `CopilotStudio`
61+
- Select `CopilotStudio.Copilots.Invoke`
62+
9. Click **Add permissions**
63+
10. (Optional) Click **Grant admin consent**
64+
65+
### Tip
66+
67+
If you **do not see Power Platform API**, follow [Step 2 in Power Platform API Authentication](https://learn.microsoft.com/en-us/power-platform/admin/programmability-authentication-v2) to add the API to your tenant.

0 commit comments

Comments
 (0)