[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69B7YGYTPKJT519DQGCA9M1":3,"skill-same:01M69B7YGYTPKJT519DQGCA9M1":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":51,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M69B7YGYTPKJT519DQGCA9M1","agents-sdk-dotnet-debugging","Agents SDK .NET 故障排查","Use when troubleshooting an agent built with the Microsoft Agents SDK (Microsoft.Agents.Hosting.AspNetCore and related packages) in C# \u002F .NET. Trigger on any of these symptoms: build or C# compile errors, crashes on startup, 401 or auth errors on incoming requests, the bot not responding to messages, appsettings.json configuration problems, Azure AD credential failures (AADSTS errors), port conflicts, or the agent not connecting in Teams or the Agents Playground. Use even if the user doesn't mention the SDK by name — trigger on symptoms like \"my bot won't start\", \"getting 401s\", or \"bot isn't responding.\"","在对使用 Microsoft Agents SDK（`Microsoft.Agents.Hosting.AspNetCore` 及相关包）以 C# \u002F .NET 构建的智能体进行故障排查时使用。出现以下任一症状时触发：构建或 C# 编译错误、启动时崩溃、传入请求的 401 或身份验证错误、机器人不响应消息、appsettings.json 配置问题、Azure AD 凭据失败（AADSTS 错误）、端口冲突，或智能体无法在 Teams 或 Agents Playground 中连接。即使用户未提及 SDK 名称也应使用——当出现诸如“我的机器人无法启动”“收到 401 错误”或“机器人没有响应”等症状时触发。","microsoft\u002FAgents","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69B7CR81D1HSNV69XDT8KAR",1109,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents\u002Fblob\u002Fmain\u002Fagent-plugins\u002Fagents-for-net\u002Fskills\u002Fagents-sdk-dotnet-debugging\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRSRYQ3M8N5063NNQPF2B1","调试与故障排查","SCENARIO","使用场景",[31,32,33,34,35,36,10,37,38,39,40],"agents sdk","sdk","dotnet","debugging","agents sdk dotnet debugging","bot","auth","azure","packages","teams","2026-11-10 10:12:30",false,"---\nname: agents-sdk-dotnet-debugging\ndescription: >\n  Use when troubleshooting an agent built with the Microsoft Agents SDK\n  (Microsoft.Agents.Hosting.AspNetCore and related packages) in C# \u002F .NET.\n  Trigger on any of these symptoms: build or C# compile errors, crashes on\n  startup, 401 or auth errors on incoming requests, the bot not responding to\n  messages, appsettings.json configuration problems, Azure AD credential\n  failures (AADSTS errors), port conflicts, or the agent not connecting in\n  Teams or the Agents Playground. Use even if the user doesn't mention the SDK\n  by name — trigger on symptoms like \"my bot won't start\", \"getting 401s\", or\n  \"bot isn't responding.\"\n---\n\n# Debugging Agents Built with Microsoft Agents SDK (.NET)\n\n## Overview\n\nMost agent failures fall into one of three categories: the code doesn't build or start, the configuration is wrong, or the agent isn't reachable. Work through this checklist in order — each step confirms a prerequisite for the next.\n\n## Checklist\n\nYou MUST create a task for each of these items and complete them in order:\n\n1. Make sure the code builds successfully.\n2. Make sure the application starts and runs without crashing.\n3. Make sure the application opens a port and listens for incoming requests.\n4. Validate the `appsettings.json` configuration.\n5. Validate the bot's credentials against Azure AD.\n6. Use the Agents Playground to test the agent end-to-end locally.\n\n---\n\n### 1. Build the code\n\n```bash\ndotnet build\n```\n\nExpected: exits with code 0, no errors. Fix any C# compile errors before continuing.\n\nCommon build errors:\n\n- **Missing package** — `dotnet add package Microsoft.Agents.Hosting.AspNetCore`\n- **Namespace not found** — wrong `using` statement; see the `agents-sdk-dotnet` skill for correct namespaces\n- **Target framework mismatch** — Agents SDK requires .NET 8+; check `\u003CTargetFramework>` in `.csproj`\n\n---\n\n### 2. Start the application\n\nRun with detailed logging:\n\n```bash\ndotnet run\n```\n\nOr with verbose logging:\n\n```bash\ndotnet run --verbosity detailed\n```\n\nTo enable debug-level SDK logging, add to `appsettings.Development.json`:\n\n```json\n{\n  \"Logging\": {\n    \"LogLevel\": {\n      \"Default\": \"Debug\",\n      \"Microsoft.Agents\": \"Debug\",\n      \"Microsoft.AspNetCore\": \"Warning\"\n    }\n  }\n}\n```\n\nWatch for crash output. Common startup errors:\n\n- **`Unable to resolve service for type 'IStorage'`** — missing `builder.Services.AddSingleton\u003CIStorage, MemoryStorage>()` in `Program.cs`\n- **`AddAgentAspNetAuthentication` missing** — add `builder.Services.AddAgentAspNetAuthentication(builder.Configuration)`\n- **Port already in use** — another process is on the port; check with `netstat -ano | findstr :3978` (Windows) or `lsof -i :3978` (macOS\u002FLinux)\n- **`InvalidOperationException` on startup** — check `appsettings.json` structure, especially `Connections` and `ConnectionsMap`\n\nIf the agent starts cleanly, you should see output like:\n\n```\nNow listening on: http:\u002F\u002Flocalhost:3978\n```\n\n---\n\n### 3. Confirm the agent is reachable\n\n```bash\ncurl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n  -X POST http:\u002F\u002Flocalhost:3978\u002Fapi\u002Fmessages \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{}'\n```\n\n| Response | Meaning |\n|---|---|\n| `401` | Agent is running, auth is active — this is correct for a configured agent |\n| `200` | Agent is running with auth disabled (`TokenValidation:Enabled = false`) — correct for local dev |\n| `000` or connection refused | Agent is not running, wrong port, or crashed on startup |\n\n---\n\n### 4. Validate `appsettings.json` configuration\n\nConfiguration mistakes are the most common source of failures. Check each area below.\n\n#### 4a. Confirm the file is being loaded\n\nASP.NET Core auto-loads `appsettings.json` and `appsettings.{Environment}.json`. Check that:\n- The file exists in the project root\n- It has `\"Copy to Output Directory\": \"PreserveNewest\"` in `.csproj` or is at the content root\n- `ASPNETCORE_ENVIRONMENT` is set correctly (`Development` for local dev)\n\n#### 4b. Check the Connections section structure\n\nThe SDK requires a specific JSON structure. Common mistakes:\n\n```json\n\u002F\u002F WRONG — flat format (this is Node.js env var style, not appsettings)\n{\n  \"ClientId\": \"...\",\n  \"ClientSecret\": \"...\",\n  \"TenantId\": \"...\"\n}\n\n\u002F\u002F CORRECT\n{\n  \"Connections\": {\n    \"ServiceConnection\": {\n      \"Settings\": {\n        \"AuthType\": \"ClientSecret\",\n        \"AuthorityEndpoint\": \"https:\u002F\u002Flogin.microsoftonline.com\u002F\u003CtenantId>\",\n        \"ClientId\": \"\u003CappId>\",\n        \"ClientSecret\": \"\u003Csecret>\",\n        \"Scopes\": [\"https:\u002F\u002Fapi.botframework.com\u002F.default\"]\n      }\n    }\n  }\n}\n```\n\n#### 4c. Check ConnectionsMap\n\nIf `ConnectionsMap` is present, it must be a JSON array with proper structure:\n\n```json\n\u002F\u002F WRONG — object instead of array\n\"ConnectionsMap\": {\n  \"ServiceUrl\": \"*\",\n  \"Connection\": \"ServiceConnection\"\n}\n\n\u002F\u002F CORRECT — array\n\"ConnectionsMap\": [\n  {\n    \"ServiceUrl\": \"*\",\n    \"Connection\": \"ServiceConnection\"\n  }\n]\n```\n\nIf omitted, the SDK defaults to mapping `*` to the first connection.\n\n#### 4d. Check TokenValidation section\n\n```json\n{\n  \"TokenValidation\": {\n    \"Enabled\": true,\n    \"Audiences\": [\"\u003Cyour-app-id>\"],\n    \"TenantId\": \"\u003Cyour-tenant-id>\"\n  }\n}\n```\n\n- `Audiences` must include your `ClientId`\n- `TenantId` must match the tenant where the app registration lives\n- Set `Enabled: false` for anonymous local development\n\n#### 4e. Check OAuth handler configuration\n\nIf your agent uses user sign-in, verify the `AgentApplication:UserAuthorization` section:\n\n```json\n{\n  \"AgentApplication\": {\n    \"UserAuthorization\": {\n      \"DefaultHandlerName\": \"graph\",\n      \"AutoSignin\": true,\n      \"Handlers\": {\n        \"graph\": {\n          \"Settings\": {\n            \"AzureBotOAuthConnectionName\": \"GraphOAuthConnection\",\n            \"Title\": \"Sign In\",\n            \"Text\": \"Please sign in\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nThe handler key (`graph`) must match the `autoSignInHandlers` used in route registration. A mismatch causes the sign-in flow to fail silently.\n\n---\n\n### 5. Validate bot credentials against Azure AD\n\nOnce `appsettings.json` looks correct, confirm the credentials actually work:\n\n```bash\ncurl -s -X POST \\\n  \"https:\u002F\u002Flogin.microsoftonline.com\u002F$tenantId\u002Foauth2\u002Fv2.0\u002Ftoken\" \\\n  -d \"grant_type=client_credentials\\\n&client_id=$clientId\\\n&client_secret=$clientSecret\\\n&scope=https:\u002F\u002Fapi.botframework.com\u002F.default\" \\\n  | jq '{token_type, expires_in, error, error_description}'\n```\n\nA successful response includes `access_token`. Common errors:\n\n| Error code | Cause |\n|---|---|\n| `AADSTS700016` | `ClientId` not found in tenant — wrong ID or wrong tenant |\n| `AADSTS7000215` | Invalid `ClientSecret` — expired or incorrect |\n| `AADSTS90002` | `TenantId` not found |\n\n---\n\n### 6. Test with Agents Playground\n\nThe Agents Playground acts as a mock connector and channel client.\n\n**Install:**\n```bash\nnpm install -g agentsplayground\n```\n\n**Run against an anonymous agent:**\n\nStart your agent:\n```bash\ndotnet run\n```\n\nIn a separate terminal:\n```bash\nagentsplayground -c emulator\n```\n\n**Run against an authenticated agent:**\n```bash\nagentsplayground -c msteams \\\n  --client-id \u003Cyour-app-id> \\\n  --client-secret \u003Cyour-secret> \\\n  --tenant-id \u003Cyour-tenant-id>\n```\n\n**Channel options** (`-c`): `msteams`, `webchat`, `directline`, `emulator`, `agents`\n\nIf the playground connects but messages don't get responses, the agent is running but a message handler may be missing. Add a fallback handler to confirm:\n\n```csharp\nOnActivity(ActivityTypes.Message, async (ctx, state, ct) =>\n{\n    await ctx.SendActivityAsync($\"Echo: {ctx.Activity.Text}\", cancellationToken: ct);\n}, rank: RouteRank.Last);\n```\n\n---\n\n### Common Runtime Errors\n\n| Error | Cause | Fix |\n|---|---|---|\n| `Unable to resolve service for type 'IStorage'` | Missing storage registration | Add `builder.Services.AddSingleton\u003CIStorage, MemoryStorage>()` |\n| `MapAgentApplicationEndpoints` 404 | Using `MapAgentEndpoints` (compat) with `AgentApplication` | Switch to `MapAgentApplicationEndpoints` |\n| `MapAgentEndpoints` 404 | Using `MapAgentApplicationEndpoints` with `ActivityHandler` | Switch to `MapAgentEndpoints` |\n| `InvalidOperationException: No agent registered` | Missing `builder.AddAgent\u003CT>()` | Add `builder.AddAgent\u003CMyAgent>()` |\n| 401 on every request | `TokenValidation:Enabled` is `true` with no\u002Fwrong credentials | Set to `false` for local dev, or fix credentials |\n| `System.Text.Json.JsonException` on card deserialization | Wrong JSON structure in card content | Validate card JSON separately |\n| OAuth sign-in card appears but token exchange fails | Wrong `AzureBotOAuthConnectionName` | Verify the connection name matches Azure Bot resource OAuth settings |\n| Streaming chunks not appearing | Missing `EndStreamAsync` call | Always call `await ctx.StreamingResponse.EndStreamAsync(ct)` in a `finally` block |\n\n---\n\n### Validate an OAuth connection name\n\nOAuth connection names can only be tested end-to-end through a real sign-in flow:\n\n**Azure Portal → Your Bot Resource → Settings → OAuth Connection Settings → [your connection] → Test Connection**\n\nThis confirms the connection name matches, the OAuth app has the right scopes, and the redirect URI (`https:\u002F\u002Ftoken.botframework.com\u002F.auth\u002Fweb\u002Fredirect`) is registered on the app registration.\n\n## Contributing\n\nIf you hit a problem this skill couldn't solve, found a workaround, or noticed something wrong or outdated, that's valuable — please help improve this skill for everyone.\n\nDraft a suggested issue title and body based on the conversation, then ask the user to open it at: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagents\u002Fissues\u002Fnew\n\nA good issue includes:\n- What the user was trying to do\n- What went wrong (errors, unexpected behavior)\n- What worked — including any workaround found during this conversation\n- Relevant code or config snippets\n","# Debugging Agents Built with Microsoft Agents SDK (.NET)\n\n## Overview\n\nMost agent failures fall into one of three categories: the code doesn't build or start, the configuration is wrong, or the agent isn't reachable. Work through this checklist in order — each step confirms a prerequisite for the next.\n\n## Checklist\n\nYou MUST create a task for each of these items and complete them in order:\n\n1. Make sure the code builds successfully.\n2. Make sure the application starts and runs without crashing.\n3. Make sure the application opens a port and listens for incoming requests.\n4. Validate the `appsettings.json` configuration.\n5. Validate the bot's credentials against Azure AD.\n6. Use the Agents Playground to test the agent end-to-end locally.\n\n---\n\n### 1. Build the code\n\n```bash\ndotnet build\n```\n\nExpected: exits with code 0, no errors. Fix any C# compile errors before continuing.\n\nCommon build errors:\n\n- **Missing package** — `dotnet add package Microsoft.Agents.Hosting.AspNetCore`\n- **Namespace not found** — wrong `using` statement; see the `agents-sdk-dotnet` skill for correct namespaces\n- **Target framework mismatch** — Agents SDK requires .NET 8+; check `\u003CTargetFramework>` in `.csproj`\n\n---\n\n### 2. Start the application\n\nRun with detailed logging:\n\n```bash\ndotnet run\n```\n\nOr with verbose logging:\n\n```bash\ndotnet run --verbosity detailed\n```\n\nTo enable debug-level SDK logging, add to `appsettings.Development.json`:\n\n```json\n{\n  \"Logging\": {\n    \"LogLevel\": {\n      \"Default\": \"Debug\",\n      \"Microsoft.Agents\": \"Debug\",\n      \"Microsoft.AspNetCore\": \"Warning\"\n    }\n  }\n}\n```\n\nWatch for crash output. Common startup errors:\n\n- **`Unable to resolve service for type 'IStorage'`** — missing `builder.Services.AddSingleton\u003CIStorage, MemoryStorage>()` in `Program.cs`\n- **`AddAgentAspNetAuthentication` missing** — add `builder.Services.AddAgentAspNetAuthentication(builder.Configuration)`\n- **Port already in use** — another process is on the port; check with `netstat -ano | findstr :3978` (Windows) or `lsof -i :3978` (macOS\u002FLinux)\n- **`InvalidOperationException` on startup** — check `appsettings.json` structure, especially `Connections` and `ConnectionsMap`\n\nIf the agent starts cleanly, you should see output like:\n\n```\nNow listening on: http:\u002F\u002Flocalhost:3978\n```\n\n---\n\n### 3. Confirm the agent is reachable\n\n```bash\ncurl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n  -X POST http:\u002F\u002Flocalhost:3978\u002Fapi\u002Fmessages \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{}'\n```\n\n| Response | Meaning |\n|---|---|\n| `401` | Agent is running, auth is active — this is correct for a configured agent |\n| `200` | Agent is running with auth disabled (`TokenValidation:Enabled = false`) — correct for local dev |\n| `000` or connection refused | Agent is not running, wrong port, or crashed on startup |\n\n---\n\n### 4. Validate `appsettings.json` configuration\n\nConfiguration mistakes are the most common source of failures. Check each area below.\n\n#### 4a. Confirm the file is being loaded\n\nASP.NET Core auto-loads `appsettings.json` and `appsettings.{Environment}.json`. Check that:\n- The file exists in the project root\n- It has `\"Copy to Output Directory\": \"PreserveNewest\"` in `.csproj` or is at the content root\n- `ASPNETCORE_ENVIRONMENT` is set correctly (`Development` for local dev)\n\n#### 4b. Check the Connections section structure\n\nThe SDK requires a specific JSON structure. Common mistakes:\n\n```json\n\u002F\u002F WRONG — flat format (this is Node.js env var style, not appsettings)\n{\n  \"ClientId\": \"...\",\n  \"ClientSecret\": \"...\",\n  \"TenantId\": \"...\"\n}\n\n\u002F\u002F CORRECT\n{\n  \"Connections\": {\n    \"ServiceConnection\": {\n      \"Settings\": {\n        \"AuthType\": \"ClientSecret\",\n        \"AuthorityEndpoint\": \"https:\u002F\u002Flogin.microsoftonline.com\u002F\u003CtenantId>\",\n        \"ClientId\": \"\u003CappId>\",\n        \"ClientSecret\": \"\u003Csecret>\",\n        \"Scopes\": [\"https:\u002F\u002Fapi.botframework.com\u002F.default\"]\n      }\n    }\n  }\n}\n```\n\n#### 4c. Check ConnectionsMap\n\nIf `ConnectionsMap` is present, it must be a JSON array with proper structure:\n\n```json\n\u002F\u002F WRONG — object instead of array\n\"ConnectionsMap\": {\n  \"ServiceUrl\": \"*\",\n  \"Connection\": \"ServiceConnection\"\n}\n\n\u002F\u002F CORRECT — array\n\"ConnectionsMap\": [\n  {\n    \"ServiceUrl\": \"*\",\n    \"Connection\": \"ServiceConnection\"\n  }\n]\n```\n\nIf omitted, the SDK defaults to mapping `*` to the first connection.\n\n#### 4d. Check TokenValidation section\n\n```json\n{\n  \"TokenValidation\": {\n    \"Enabled\": true,\n    \"Audiences\": [\"\u003Cyour-app-id>\"],\n    \"TenantId\": \"\u003Cyour-tenant-id>\"\n  }\n}\n```\n\n- `Audiences` must include your `ClientId`\n- `TenantId` must match the tenant where the app registration lives\n- Set `Enabled: false` for anonymous local development\n\n#### 4e. Check OAuth handler configuration\n\nIf your agent uses user sign-in, verify the `AgentApplication:UserAuthorization` section:\n\n```json\n{\n  \"AgentApplication\": {\n    \"UserAuthorization\": {\n      \"DefaultHandlerName\": \"graph\",\n      \"AutoSignin\": true,\n      \"Handlers\": {\n        \"graph\": {\n          \"Settings\": {\n            \"AzureBotOAuthConnectionName\": \"GraphOAuthConnection\",\n            \"Title\": \"Sign In\",\n            \"Text\": \"Please sign in\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nThe handler key (`graph`) must match the `autoSignInHandlers` used in route registration. A mismatch causes the sign-in flow to fail silently.\n\n---\n\n### 5. Validate bot credentials against Azure AD\n\nOnce `appsettings.json` looks correct, confirm the credentials actually work:\n\n```bash\ncurl -s -X POST \\\n  \"https:\u002F\u002Flogin.microsoftonline.com\u002F$tenantId\u002Foauth2\u002Fv2.0\u002Ftoken\" \\\n  -d \"grant_type=client_credentials\\\n&client_id=$clientId\\\n&client_secret=$clientSecret\\\n&scope=https:\u002F\u002Fapi.botframework.com\u002F.default\" \\\n  | jq '{token_type, expires_in, error, error_description}'\n```\n\nA successful response includes `access_token`. Common errors:\n\n| Error code | Cause |\n|---|---|\n| `AADSTS700016` | `ClientId` not found in tenant — wrong ID or wrong tenant |\n| `AADSTS7000215` | Invalid `ClientSecret` — expired or incorrect |\n| `AADSTS90002` | `TenantId` not found |\n\n---\n\n### 6. Test with Agents Playground\n\nThe Agents Playground acts as a mock connector and channel client.\n\n**Install:**\n```bash\nnpm install -g agentsplayground\n```\n\n**Run against an anonymous agent:**\n\nStart your agent:\n```bash\ndotnet run\n```\n\nIn a separate terminal:\n```bash\nagentsplayground -c emulator\n```\n\n**Run against an authenticated agent:**\n```bash\nagentsplayground -c msteams \\\n  --client-id \u003Cyour-app-id> \\\n  --client-secret \u003Cyour-secret> \\\n  --tenant-id \u003Cyour-tenant-id>\n```\n\n**Channel options** (`-c`): `msteams`, `webchat`, `directline`, `emulator`, `agents`\n\nIf the playground connects but messages don't get responses, the agent is running but a message handler may be missing. Add a fallback handler to confirm:\n\n```csharp\nOnActivity(ActivityTypes.Message, async (ctx, state, ct) =>\n{\n    await ctx.SendActivityAsync($\"Echo: {ctx.Activity.Text}\", cancellationToken: ct);\n}, rank: RouteRank.Last);\n```\n\n---\n\n### Common Runtime Errors\n\n| Error | Cause | Fix |\n|---|---|---|\n| `Unable to resolve service for type 'IStorage'` | Missing storage registration | Add `builder.Services.AddSingleton\u003CIStorage, MemoryStorage>()` |\n| `MapAgentApplicationEndpoints` 404 | Using `MapAgentEndpoints` (compat) with `AgentApplication` | Switch to `MapAgentApplicationEndpoints` |\n| `MapAgentEndpoints` 404 | Using `MapAgentApplicationEndpoints` with `ActivityHandler` | Switch to `MapAgentEndpoints` |\n| `InvalidOperationException: No agent registered` | Missing `builder.AddAgent\u003CT>()` | Add `builder.AddAgent\u003CMyAgent>()` |\n| 401 on every request | `TokenValidation:Enabled` is `true` with no\u002Fwrong credentials | Set to `false` for local dev, or fix credentials |\n| `System.Text.Json.JsonException` on card deserialization | Wrong JSON structure in card content | Validate card JSON separately |\n| OAuth sign-in card appears but token exchange fails | Wrong `AzureBotOAuthConnectionName` | Verify the connection name matches Azure Bot resource OAuth settings |\n| Streaming chunks not appearing | Missing `EndStreamAsync` call | Always call `await ctx.StreamingResponse.EndStreamAsync(ct)` in a `finally` block |\n\n---\n\n### Validate an OAuth connection name\n\nOAuth connection names can only be tested end-to-end through a real sign-in flow:\n\n**Azure Portal → Your Bot Resource → Settings → OAuth Connection Settings → [your connection] → Test Connection**\n\nThis confirms the connection name matches, the OAuth app has the right scopes, and the redirect URI (`https:\u002F\u002Ftoken.botframework.com\u002F.auth\u002Fweb\u002Fredirect`) is registered on the app registration.\n\n## Contributing\n\nIf you hit a problem this skill couldn't solve, found a workaround, or noticed something wrong or outdated, that's valuable — please help improve this skill for everyone.\n\nDraft a suggested issue title and body based on the conversation, then ask the user to open it at: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagents\u002Fissues\u002Fnew\n\nA good issue includes:\n- What the user was trying to do\n- What went wrong (errors, unexpected behavior)\n- What worked — including any workaround found during this conversation\n- Relevant code or config snippets\n",{"name":5,"description":7},"main","8171bc7e0ca3b8defd578a6bb317367c2901983f","agent-plugins\u002Fagents-for-net\u002Fskills\u002Fagents-sdk-dotnet-debugging",346,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents","https:\u002F\u002Faka.ms\u002Fagentsdkdocs","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 08:54:12",{"source":9,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add microsoft\u002FAgents --skill agents-sdk-dotnet-debugging",{"tool":62,"command":63},"bunx","bunx skills add microsoft\u002FAgents --skill agents-sdk-dotnet-debugging",{"tool":65,"command":66},"pnpm","pnpm dlx skills add microsoft\u002FAgents --skill agents-sdk-dotnet-debugging","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents\u002Fblob\u002Fmain\u002Fagent-plugins\u002Fagents-for-net\u002Fskills\u002Fagents-sdk-dotnet-debugging\u002FSKILL.md",true,[],[71,88,107,122,140,153],{"skillNo":72,"name":73,"nameZh":17,"description":74,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":41},"01M6PJCYCYJQDX318SQN3EBF0E","sync-teams-samples-to-agents-sdk","CI instructions for a bounded Teams SDK to Agents SDK sample synchronization using the selected language profile.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents\u002Fblob\u002Fmain\u002Fautomation\u002Fteams-sample-sync\u002Fskills\u002Fsync-teams-samples-to-agents-sdk\u002FSKILL.md",[],[31,32,78,40,79,80,81,82,83,84,85,86,87],"sync","sync teams samples to agents sdk","ci","synchronization","instructions","profile","language","sample","for","bounded",{"skillNo":89,"name":90,"nameZh":17,"description":91,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":41},"01M6PJCFNGCX555YERYQ459JFE","teams-sdk-to-agents-sdk-typescript-migration","Migrate a JavaScript or TypeScript application using the Microsoft Teams SDK App runtime to Microsoft 365 Agents SDK while preserving its Teams behaviors. Use for Teams SDK migrations, including automated sample synchronization; use the separate Bot Framework migration skill for botbuilder applications.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents\u002Fblob\u002Fmain\u002Fagent-plugins\u002Fagents-for-js\u002Fskills\u002Fteams-sdk-to-agents-sdk-typescript-migration\u002FSKILL.md",[],[40,95,31,32,96,97,98,99,100,101,102,85,103,104,81,105,86,36,106,10],"typescript","agents sdk typescript","migration","teams sdk to agents sdk typescript migration","microsoft teams","applications","app","runtime","migrations","use","migrate","javascript",{"skillNo":108,"name":109,"nameZh":110,"description":111,"descriptionZh":112,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":113,"categories":114,"keywords":119,"publishedAt":41},"01M69B8QV24JVPXH25EH77X0SZ","teams-app-manifest","Teams 应用清单创建与审核","Create or audit a Microsoft Teams app manifest for an existing Microsoft 365 Agents SDK application by mapping declared intent and source-code evidence to released manifest capabilities. Use when manifest.json is missing, incomplete, or must be checked against implemented Teams features. Does not configure Microsoft Entra, Azure Bot, Developer Portal, or deployment unless separately requested.","为现有的 Microsoft 365 Agents SDK 应用程序创建或审核 Microsoft Teams 应用清单，方法是将声明的意图和源代码证据映射到已发布清单所支持的能力。适用于 manifest.json 缺失、不完整，或需要对照已实现的 Teams 功能进行核查的情况。除非另行要求，否则不配置 Microsoft Entra、Azure Bot、开发者门户（Developer Portal）或部署。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents\u002Fblob\u002Fmain\u002Fagent-plugins\u002Fagents-sdk-common\u002Fskills\u002Fteams-app-manifest\u002FSKILL.md",[115,116],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":117,"categoryName":118,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发",[40,120,32,36,31,10,38,121],"teams app manifest","deployment",{"skillNo":123,"name":124,"nameZh":125,"description":126,"descriptionZh":127,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":128,"categories":129,"keywords":134,"publishedAt":41},"01M69B8MN62NBY93YTJAQG2Y81","agents-sdk-provision","Agents SDK Azure 资源预配","Use when provisioning Azure resources for a Microsoft Agents SDK application — including creating an Azure Bot Service resource, setting up Entra app registrations, configuring identity credentials (UserManagedIdentity, FederatedCredentials, or ClientSecret), adding a Teams channel, running Bicep deployments for SSO, or setting up OAuth user sign-in connections via az CLI. Trigger even if the user doesn't say \"provision\" — use on requests like \"set up my bot on Azure\", \"deploy my bot\", \"configure Azure for my bot\", or \"get Teams SSO working.\" Applies to all languages (dotnet, Node.js, Python).","在为 Microsoft Agents SDK 应用预配 Azure 资源时使用——包括创建 Azure Bot Service 资源、设置 Entra 应用注册、配置身份凭据（UserManagedIdentity、FederatedCredentials 或 ClientSecret）、添加 Teams 频道、运行 Bicep 部署以实现 SSO，或通过 az CLI 设置 OAuth 用户登录连接。即使用户没有说“预配”也应触发——在诸如“在 Azure 上搭建我的机器人”“部署我的机器人”“为我的机器人配置 Azure”“让 Teams SSO 跑起来”等请求时使用。适用于所有语言（dotnet、Node.js、Python）。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents\u002Fblob\u002Fmain\u002Fagent-plugins\u002Fagents-sdk-common\u002Fskills\u002Fagents-sdk-provision\u002FSKILL.md",[130,133],{"categoryNo":131,"categoryName":132,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",{"categoryNo":117,"categoryName":118,"taxonomyType":28,"taxonomyTypeDesc":29},[31,32,135,36,136,137,10,33,138,139,38,40],"agents sdk provision","cli","python","identity","deploy",{"skillNo":141,"name":142,"nameZh":143,"description":144,"descriptionZh":145,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":146,"categories":147,"keywords":150,"publishedAt":41},"01M69B8HFZ45NQGWQQD483TWPB","agents-sdk-to-prod","Agents SDK 智能体生产加固","Assess, create, harden, deploy, or review production readiness of Python Microsoft 365 Agents SDK agents and their direct hosting\u002Foperations files. Use only for Agents SDK scenarios, not unrelated application hardening.","评估、创建、加固、部署或审查 Python Microsoft 365 Agents SDK 智能体的生产就绪度，以及其直接的托管\u002F运维文件。仅用于 Agents SDK 场景，不用于无关的应用加固。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents\u002Fblob\u002Fmain\u002Fagent-plugins\u002Fagents-for-python\u002Fskills\u002Fagents-sdk-to-prod\u002FSKILL.md",[148,149],{"categoryNo":131,"categoryName":132,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":117,"categoryName":118,"taxonomyType":28,"taxonomyTypeDesc":29},[151,32,31,10,137,152,139],"agents sdk to prod","review",{"skillNo":154,"name":155,"nameZh":156,"description":157,"descriptionZh":158,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":159,"categories":160,"keywords":167,"publishedAt":41},"01M69B8ENJGC9NPQBZAYAN4706","agents-sdk-python-otel","Agents SDK Python 可观测性配置","Use when adding, configuring, validating, or troubleshooting OpenTelemetry observability for a Microsoft 365 Agents SDK application in Python. Trigger when the user mentions OpenTelemetry, OTel, telemetry, traces, metrics, logs, OTLP, Aspire Dashboard, Application Insights, Azure Monitor, distributed tracing, custom tracers or meters, span sampling, or observing microsoft_agents SDK signals.","用于为 Python 版 Microsoft 365 Agents SDK 应用添加、配置、验证或排查 OpenTelemetry 可观测性。当用户提及 OpenTelemetry、OTel、遥测、traces、metrics、logs、OTLP、Aspire Dashboard、Application Insights、Azure Monitor、分布式追踪、自定义 tracer 或 meter、span 采样，或观测 microsoft_agents SDK 信号时触发。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAgents\u002Fblob\u002Fmain\u002Fagent-plugins\u002Fagents-for-python\u002Fskills\u002Fagents-sdk-python-otel\u002FSKILL.md",[161,164],{"categoryNo":162,"categoryName":163,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQGD3B3T8FK02S5JVCZA1M","运维监控与告警",{"categoryNo":165,"categoryName":166,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",[31,137,168,32,169,170,38,171,10,172,173,174,175],"otel","agents sdk python otel","aspire","telemetry","dashboard","distributed","aspire dashboard","monitor"]