[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74Q3HE7DMDFZP4PAJ9M4E94":3,"skill-same:01M74Q3HE7DMDFZP4PAJ9M4E94":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M74Q3HE7DMDFZP4PAJ9M4E94","azure-mgmt-botservice-dotnet",null,"Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: \"Bot Service\", \"BotResource\", \"Azure Bot\", \"DirectLine channel\", \"Teams channel\", \"bot management .NET\", \"create bot\".","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fazure-mgmt-botservice-dotnet\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: azure-mgmt-botservice-dotnet\ndescription: |\n  Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: \"Bot Service\", \"BotResource\", \"Azure Bot\", \"DirectLine channel\", \"Teams channel\", \"bot management .NET\", \"create bot\".\nlicense: MIT\nmetadata:\n  author: Microsoft\n  version: \"1.0.0\"\n  package: Azure.ResourceManager.BotService\n---\n\n# Azure.ResourceManager.BotService (.NET)\n\nManagement plane SDK for provisioning and managing Azure Bot Service resources via Azure Resource Manager.\n\n## Installation\n\n```bash\ndotnet add package Azure.ResourceManager.BotService\ndotnet add package Azure.Identity\n```\n\n**Current Versions**: Stable v1.1.1, Preview v1.1.0-beta.1\n\n## Environment Variables\n\n```bash\nAZURE_SUBSCRIPTION_ID=\u003Cyour-subscription-id> # Required: Azure subscription ID\nAZURE_TOKEN_CREDENTIALS=prod  # Required only if DefaultAzureCredential is used in production\nAZURE_TENANT_ID=\u003Ctenant-id> # For service principal auth (optional)\nAZURE_CLIENT_ID=\u003Cclient-id> # For service principal auth (optional)\nAZURE_CLIENT_SECRET=\u003Cclient-secret> # For service principal auth (optional)\n```\n\n## Authentication\n\n```csharp\nusing Azure.Identity;\nusing Azure.ResourceManager;\nusing Azure.ResourceManager.BotService;\n\n\u002F\u002F Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\nvar credential = new DefaultAzureCredential(\n    DefaultAzureCredential.DefaultEnvironmentVariableName\n);\n\u002F\u002F Or use a specific credential directly in production:\n\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-dotnet#credential-classes\n\u002F\u002F var credential = new ManagedIdentityCredential();\nArmClient armClient = new ArmClient(credential);\n\n\u002F\u002F Get subscription and resource group\nSubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync();\nResourceGroupResource resourceGroup = await subscription.GetResourceGroups().GetAsync(\"myResourceGroup\");\n\n\u002F\u002F Access bot collection\nBotCollection botCollection = resourceGroup.GetBots();\n```\n\n## Resource Hierarchy\n\n```\nArmClient\n└── SubscriptionResource\n    └── ResourceGroupResource\n        └── BotResource\n            ├── BotChannelResource (DirectLine, Teams, Slack, etc.)\n            ├── BotConnectionSettingResource (OAuth connections)\n            └── BotServicePrivateEndpointConnectionResource\n```\n\n## Core Workflows\n\n### 1. Create Bot Resource\n\n```csharp\nusing Azure.ResourceManager.BotService;\nusing Azure.ResourceManager.BotService.Models;\n\n\u002F\u002F Create bot data\nvar botData = new BotData(AzureLocation.WestUS2)\n{\n    Kind = BotServiceKind.Azurebot,\n    Sku = new BotServiceSku(BotServiceSkuName.F0),\n    Properties = new BotProperties(\n        displayName: \"MyBot\",\n        endpoint: new Uri(\"https:\u002F\u002Fmybot.azurewebsites.net\u002Fapi\u002Fmessages\"),\n        msaAppId: \"\u003Cyour-msa-app-id>\")\n    {\n        Description = \"My Azure Bot\",\n        MsaAppType = BotMsaAppType.MultiTenant\n    }\n};\n\n\u002F\u002F Create or update the bot\nArmOperation\u003CBotResource> operation = await botCollection.CreateOrUpdateAsync(\n    WaitUntil.Completed, \n    \"myBotName\", \n    botData);\n    \nBotResource bot = operation.Value;\nConsole.WriteLine($\"Bot created: {bot.Data.Name}\");\n```\n\n### 2. Configure DirectLine Channel\n\n```csharp\n\u002F\u002F Get the bot\nBotResource bot = await resourceGroup.GetBots().GetAsync(\"myBotName\");\n\n\u002F\u002F Get channel collection\nBotChannelCollection channels = bot.GetBotChannels();\n\n\u002F\u002F Create DirectLine channel configuration\nvar channelData = new BotChannelData(AzureLocation.WestUS2)\n{\n    Properties = new DirectLineChannel()\n    {\n        Properties = new DirectLineChannelProperties()\n        {\n            Sites = \n            {\n                new DirectLineSite(\"Default Site\")\n                {\n                    IsEnabled = true,\n                    IsV1Enabled = false,\n                    IsV3Enabled = true,\n                    IsSecureSiteEnabled = true\n                }\n            }\n        }\n    }\n};\n\n\u002F\u002F Create or update the channel\nArmOperation\u003CBotChannelResource> channelOp = await channels.CreateOrUpdateAsync(\n    WaitUntil.Completed,\n    BotChannelName.DirectLineChannel,\n    channelData);\n\nConsole.WriteLine(\"DirectLine channel configured\");\n```\n\n### 3. Configure Microsoft Teams Channel\n\n```csharp\nvar teamsChannelData = new BotChannelData(AzureLocation.WestUS2)\n{\n    Properties = new MsTeamsChannel()\n    {\n        Properties = new MsTeamsChannelProperties()\n        {\n            IsEnabled = true,\n            EnableCalling = false\n        }\n    }\n};\n\nawait channels.CreateOrUpdateAsync(\n    WaitUntil.Completed,\n    BotChannelName.MsTeamsChannel,\n    teamsChannelData);\n```\n\n### 4. Configure Web Chat Channel\n\n```csharp\nvar webChatChannelData = new BotChannelData(AzureLocation.WestUS2)\n{\n    Properties = new WebChatChannel()\n    {\n        Properties = new WebChatChannelProperties()\n        {\n            Sites =\n            {\n                new WebChatSite(\"Default Site\")\n                {\n                    IsEnabled = true\n                }\n            }\n        }\n    }\n};\n\nawait channels.CreateOrUpdateAsync(\n    WaitUntil.Completed,\n    BotChannelName.WebChatChannel,\n    webChatChannelData);\n```\n\n### 5. Get Bot and List Channels\n\n```csharp\n\u002F\u002F Get bot\nBotResource bot = await botCollection.GetAsync(\"myBotName\");\nConsole.WriteLine($\"Bot: {bot.Data.Properties.DisplayName}\");\nConsole.WriteLine($\"Endpoint: {bot.Data.Properties.Endpoint}\");\n\n\u002F\u002F List channels\nawait foreach (BotChannelResource channel in bot.GetBotChannels().GetAllAsync())\n{\n    Console.WriteLine($\"Channel: {channel.Data.Name}\");\n}\n```\n\n### 6. Regenerate DirectLine Keys\n\n```csharp\nvar regenerateRequest = new BotChannelRegenerateKeysContent(BotChannelName.DirectLineChannel)\n{\n    SiteName = \"Default Site\"\n};\n\nBotChannelResource channelWithKeys = await bot.GetBotChannelWithRegenerateKeysAsync(regenerateRequest);\n```\n\n### 7. Update Bot\n\n```csharp\nBotResource bot = await botCollection.GetAsync(\"myBotName\");\n\n\u002F\u002F Update using patch\nvar updateData = new BotData(bot.Data.Location)\n{\n    Properties = new BotProperties(\n        displayName: \"Updated Bot Name\",\n        endpoint: bot.Data.Properties.Endpoint,\n        msaAppId: bot.Data.Properties.MsaAppId)\n    {\n        Description = \"Updated description\"\n    }\n};\n\nawait bot.UpdateAsync(updateData);\n```\n\n### 8. Delete Bot\n\n```csharp\nBotResource bot = await botCollection.GetAsync(\"myBotName\");\nawait bot.DeleteAsync(WaitUntil.Completed);\n```\n\n## Supported Channel Types\n\n| Channel | Constant | Class |\n|---------|----------|-------|\n| Direct Line | `BotChannelName.DirectLineChannel` | `DirectLineChannel` |\n| Direct Line Speech | `BotChannelName.DirectLineSpeechChannel` | `DirectLineSpeechChannel` |\n| Microsoft Teams | `BotChannelName.MsTeamsChannel` | `MsTeamsChannel` |\n| Web Chat | `BotChannelName.WebChatChannel` | `WebChatChannel` |\n| Slack | `BotChannelName.SlackChannel` | `SlackChannel` |\n| Facebook | `BotChannelName.FacebookChannel` | `FacebookChannel` |\n| Email | `BotChannelName.EmailChannel` | `EmailChannel` |\n| Telegram | `BotChannelName.TelegramChannel` | `TelegramChannel` |\n| Telephony | `BotChannelName.TelephonyChannel` | `TelephonyChannel` |\n\n## Key Types Reference\n\n| Type | Purpose |\n|------|---------|\n| `ArmClient` | Entry point for all ARM operations |\n| `BotResource` | Represents an Azure Bot resource |\n| `BotCollection` | Collection for bot CRUD |\n| `BotData` | Bot resource definition |\n| `BotProperties` | Bot configuration properties |\n| `BotChannelResource` | Channel configuration |\n| `BotChannelCollection` | Collection of channels |\n| `BotChannelData` | Channel configuration data |\n| `BotConnectionSettingResource` | OAuth connection settings |\n\n## BotServiceKind Values\n\n| Value | Description |\n|-------|-------------|\n| `BotServiceKind.Azurebot` | Azure Bot (recommended) |\n| `BotServiceKind.Bot` | Legacy Bot Framework bot |\n| `BotServiceKind.Designer` | Composer bot |\n| `BotServiceKind.Function` | Function bot |\n| `BotServiceKind.Sdk` | SDK bot |\n\n## BotServiceSkuName Values\n\n| Value | Description |\n|-------|-------------|\n| `BotServiceSkuName.F0` | Free tier |\n| `BotServiceSkuName.S1` | Standard tier |\n\n## BotMsaAppType Values\n\n| Value | Description |\n|-------|-------------|\n| `BotMsaAppType.MultiTenant` | Multi-tenant app |\n| `BotMsaAppType.SingleTenant` | Single-tenant app |\n| `BotMsaAppType.UserAssignedMSI` | User-assigned managed identity |\n\n## Best Practices\n\n1. **Use `DefaultAzureCredential`** — supports multiple auth methods\n2. **Use `WaitUntil.Completed`** for synchronous operations\n3. **Handle `RequestFailedException`** for API errors\n4. **Use async methods** (`*Async`) for all operations\n5. **Store MSA App credentials securely** — use Key Vault for secrets\n6. **Use managed identity** (`BotMsaAppType.UserAssignedMSI`) for production bots\n7. **Enable secure sites** for DirectLine channels in production\n\n## Error Handling\n\n```csharp\nusing Azure;\n\ntry\n{\n    var operation = await botCollection.CreateOrUpdateAsync(\n        WaitUntil.Completed, \n        botName, \n        botData);\n}\ncatch (RequestFailedException ex) when (ex.Status == 409)\n{\n    Console.WriteLine(\"Bot already exists\");\n}\ncatch (RequestFailedException ex)\n{\n    Console.WriteLine($\"ARM Error: {ex.Status} - {ex.ErrorCode}: {ex.Message}\");\n}\n```\n\n## Related SDKs\n\n| SDK | Purpose | Install |\n|-----|---------|---------|\n| `Azure.ResourceManager.BotService` | Bot management (this SDK) | `dotnet add package Azure.ResourceManager.BotService` |\n| `Microsoft.Bot.Builder` | Bot Framework SDK | `dotnet add package Microsoft.Bot.Builder` |\n| `Microsoft.Bot.Builder.Integration.AspNet.Core` | ASP.NET Core integration | `dotnet add package Microsoft.Bot.Builder.Integration.AspNet.Core` |\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| NuGet Package | https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FAzure.ResourceManager.BotService |\n| API Reference | https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fazure.resourcemanager.botservice |\n| GitHub Source | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Ftree\u002Fmain\u002Fsdk\u002Fbotservice\u002FAzure.ResourceManager.BotService |\n| Azure Bot Service Docs | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fbot-service\u002F |\n","# Azure.ResourceManager.BotService (.NET)\n\nManagement plane SDK for provisioning and managing Azure Bot Service resources via Azure Resource Manager.\n\n## Installation\n\n```bash\ndotnet add package Azure.ResourceManager.BotService\ndotnet add package Azure.Identity\n```\n\n**Current Versions**: Stable v1.1.1, Preview v1.1.0-beta.1\n\n## Environment Variables\n\n```bash\nAZURE_SUBSCRIPTION_ID=\u003Cyour-subscription-id> # Required: Azure subscription ID\nAZURE_TOKEN_CREDENTIALS=prod  # Required only if DefaultAzureCredential is used in production\nAZURE_TENANT_ID=\u003Ctenant-id> # For service principal auth (optional)\nAZURE_CLIENT_ID=\u003Cclient-id> # For service principal auth (optional)\nAZURE_CLIENT_SECRET=\u003Cclient-secret> # For service principal auth (optional)\n```\n\n## Authentication\n\n```csharp\nusing Azure.Identity;\nusing Azure.ResourceManager;\nusing Azure.ResourceManager.BotService;\n\n\u002F\u002F Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\nvar credential = new DefaultAzureCredential(\n    DefaultAzureCredential.DefaultEnvironmentVariableName\n);\n\u002F\u002F Or use a specific credential directly in production:\n\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-dotnet#credential-classes\n\u002F\u002F var credential = new ManagedIdentityCredential();\nArmClient armClient = new ArmClient(credential);\n\n\u002F\u002F Get subscription and resource group\nSubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync();\nResourceGroupResource resourceGroup = await subscription.GetResourceGroups().GetAsync(\"myResourceGroup\");\n\n\u002F\u002F Access bot collection\nBotCollection botCollection = resourceGroup.GetBots();\n```\n\n## Resource Hierarchy\n\n```\nArmClient\n└── SubscriptionResource\n    └── ResourceGroupResource\n        └── BotResource\n            ├── BotChannelResource (DirectLine, Teams, Slack, etc.)\n            ├── BotConnectionSettingResource (OAuth connections)\n            └── BotServicePrivateEndpointConnectionResource\n```\n\n## Core Workflows\n\n### 1. Create Bot Resource\n\n```csharp\nusing Azure.ResourceManager.BotService;\nusing Azure.ResourceManager.BotService.Models;\n\n\u002F\u002F Create bot data\nvar botData = new BotData(AzureLocation.WestUS2)\n{\n    Kind = BotServiceKind.Azurebot,\n    Sku = new BotServiceSku(BotServiceSkuName.F0),\n    Properties = new BotProperties(\n        displayName: \"MyBot\",\n        endpoint: new Uri(\"https:\u002F\u002Fmybot.azurewebsites.net\u002Fapi\u002Fmessages\"),\n        msaAppId: \"\u003Cyour-msa-app-id>\")\n    {\n        Description = \"My Azure Bot\",\n        MsaAppType = BotMsaAppType.MultiTenant\n    }\n};\n\n\u002F\u002F Create or update the bot\nArmOperation\u003CBotResource> operation = await botCollection.CreateOrUpdateAsync(\n    WaitUntil.Completed, \n    \"myBotName\", \n    botData);\n    \nBotResource bot = operation.Value;\nConsole.WriteLine($\"Bot created: {bot.Data.Name}\");\n```\n\n### 2. Configure DirectLine Channel\n\n```csharp\n\u002F\u002F Get the bot\nBotResource bot = await resourceGroup.GetBots().GetAsync(\"myBotName\");\n\n\u002F\u002F Get channel collection\nBotChannelCollection channels = bot.GetBotChannels();\n\n\u002F\u002F Create DirectLine channel configuration\nvar channelData = new BotChannelData(AzureLocation.WestUS2)\n{\n    Properties = new DirectLineChannel()\n    {\n        Properties = new DirectLineChannelProperties()\n        {\n            Sites = \n            {\n                new DirectLineSite(\"Default Site\")\n                {\n                    IsEnabled = true,\n                    IsV1Enabled = false,\n                    IsV3Enabled = true,\n                    IsSecureSiteEnabled = true\n                }\n            }\n        }\n    }\n};\n\n\u002F\u002F Create or update the channel\nArmOperation\u003CBotChannelResource> channelOp = await channels.CreateOrUpdateAsync(\n    WaitUntil.Completed,\n    BotChannelName.DirectLineChannel,\n    channelData);\n\nConsole.WriteLine(\"DirectLine channel configured\");\n```\n\n### 3. Configure Microsoft Teams Channel\n\n```csharp\nvar teamsChannelData = new BotChannelData(AzureLocation.WestUS2)\n{\n    Properties = new MsTeamsChannel()\n    {\n        Properties = new MsTeamsChannelProperties()\n        {\n            IsEnabled = true,\n            EnableCalling = false\n        }\n    }\n};\n\nawait channels.CreateOrUpdateAsync(\n    WaitUntil.Completed,\n    BotChannelName.MsTeamsChannel,\n    teamsChannelData);\n```\n\n### 4. Configure Web Chat Channel\n\n```csharp\nvar webChatChannelData = new BotChannelData(AzureLocation.WestUS2)\n{\n    Properties = new WebChatChannel()\n    {\n        Properties = new WebChatChannelProperties()\n        {\n            Sites =\n            {\n                new WebChatSite(\"Default Site\")\n                {\n                    IsEnabled = true\n                }\n            }\n        }\n    }\n};\n\nawait channels.CreateOrUpdateAsync(\n    WaitUntil.Completed,\n    BotChannelName.WebChatChannel,\n    webChatChannelData);\n```\n\n### 5. Get Bot and List Channels\n\n```csharp\n\u002F\u002F Get bot\nBotResource bot = await botCollection.GetAsync(\"myBotName\");\nConsole.WriteLine($\"Bot: {bot.Data.Properties.DisplayName}\");\nConsole.WriteLine($\"Endpoint: {bot.Data.Properties.Endpoint}\");\n\n\u002F\u002F List channels\nawait foreach (BotChannelResource channel in bot.GetBotChannels().GetAllAsync())\n{\n    Console.WriteLine($\"Channel: {channel.Data.Name}\");\n}\n```\n\n### 6. Regenerate DirectLine Keys\n\n```csharp\nvar regenerateRequest = new BotChannelRegenerateKeysContent(BotChannelName.DirectLineChannel)\n{\n    SiteName = \"Default Site\"\n};\n\nBotChannelResource channelWithKeys = await bot.GetBotChannelWithRegenerateKeysAsync(regenerateRequest);\n```\n\n### 7. Update Bot\n\n```csharp\nBotResource bot = await botCollection.GetAsync(\"myBotName\");\n\n\u002F\u002F Update using patch\nvar updateData = new BotData(bot.Data.Location)\n{\n    Properties = new BotProperties(\n        displayName: \"Updated Bot Name\",\n        endpoint: bot.Data.Properties.Endpoint,\n        msaAppId: bot.Data.Properties.MsaAppId)\n    {\n        Description = \"Updated description\"\n    }\n};\n\nawait bot.UpdateAsync(updateData);\n```\n\n### 8. Delete Bot\n\n```csharp\nBotResource bot = await botCollection.GetAsync(\"myBotName\");\nawait bot.DeleteAsync(WaitUntil.Completed);\n```\n\n## Supported Channel Types\n\n| Channel | Constant | Class |\n|---------|----------|-------|\n| Direct Line | `BotChannelName.DirectLineChannel` | `DirectLineChannel` |\n| Direct Line Speech | `BotChannelName.DirectLineSpeechChannel` | `DirectLineSpeechChannel` |\n| Microsoft Teams | `BotChannelName.MsTeamsChannel` | `MsTeamsChannel` |\n| Web Chat | `BotChannelName.WebChatChannel` | `WebChatChannel` |\n| Slack | `BotChannelName.SlackChannel` | `SlackChannel` |\n| Facebook | `BotChannelName.FacebookChannel` | `FacebookChannel` |\n| Email | `BotChannelName.EmailChannel` | `EmailChannel` |\n| Telegram | `BotChannelName.TelegramChannel` | `TelegramChannel` |\n| Telephony | `BotChannelName.TelephonyChannel` | `TelephonyChannel` |\n\n## Key Types Reference\n\n| Type | Purpose |\n|------|---------|\n| `ArmClient` | Entry point for all ARM operations |\n| `BotResource` | Represents an Azure Bot resource |\n| `BotCollection` | Collection for bot CRUD |\n| `BotData` | Bot resource definition |\n| `BotProperties` | Bot configuration properties |\n| `BotChannelResource` | Channel configuration |\n| `BotChannelCollection` | Collection of channels |\n| `BotChannelData` | Channel configuration data |\n| `BotConnectionSettingResource` | OAuth connection settings |\n\n## BotServiceKind Values\n\n| Value | Description |\n|-------|-------------|\n| `BotServiceKind.Azurebot` | Azure Bot (recommended) |\n| `BotServiceKind.Bot` | Legacy Bot Framework bot |\n| `BotServiceKind.Designer` | Composer bot |\n| `BotServiceKind.Function` | Function bot |\n| `BotServiceKind.Sdk` | SDK bot |\n\n## BotServiceSkuName Values\n\n| Value | Description |\n|-------|-------------|\n| `BotServiceSkuName.F0` | Free tier |\n| `BotServiceSkuName.S1` | Standard tier |\n\n## BotMsaAppType Values\n\n| Value | Description |\n|-------|-------------|\n| `BotMsaAppType.MultiTenant` | Multi-tenant app |\n| `BotMsaAppType.SingleTenant` | Single-tenant app |\n| `BotMsaAppType.UserAssignedMSI` | User-assigned managed identity |\n\n## Best Practices\n\n1. **Use `DefaultAzureCredential`** — supports multiple auth methods\n2. **Use `WaitUntil.Completed`** for synchronous operations\n3. **Handle `RequestFailedException`** for API errors\n4. **Use async methods** (`*Async`) for all operations\n5. **Store MSA App credentials securely** — use Key Vault for secrets\n6. **Use managed identity** (`BotMsaAppType.UserAssignedMSI`) for production bots\n7. **Enable secure sites** for DirectLine channels in production\n\n## Error Handling\n\n```csharp\nusing Azure;\n\ntry\n{\n    var operation = await botCollection.CreateOrUpdateAsync(\n        WaitUntil.Completed, \n        botName, \n        botData);\n}\ncatch (RequestFailedException ex) when (ex.Status == 409)\n{\n    Console.WriteLine(\"Bot already exists\");\n}\ncatch (RequestFailedException ex)\n{\n    Console.WriteLine($\"ARM Error: {ex.Status} - {ex.ErrorCode}: {ex.Message}\");\n}\n```\n\n## Related SDKs\n\n| SDK | Purpose | Install |\n|-----|---------|---------|\n| `Azure.ResourceManager.BotService` | Bot management (this SDK) | `dotnet add package Azure.ResourceManager.BotService` |\n| `Microsoft.Bot.Builder` | Bot Framework SDK | `dotnet add package Microsoft.Bot.Builder` |\n| `Microsoft.Bot.Builder.Integration.AspNet.Core` | ASP.NET Core integration | `dotnet add package Microsoft.Bot.Builder.Integration.AspNet.Core` |\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| NuGet Package | https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FAzure.ResourceManager.BotService |\n| API Reference | https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fazure.resourcemanager.botservice |\n| GitHub Source | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Ftree\u002Fmain\u002Fsdk\u002Fbotservice\u002FAzure.ResourceManager.BotService |\n| Azure Bot Service Docs | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fbot-service\u002F |\n",{"name":5,"license":15,"metadata":24,"description":28},{"author":25,"package":26,"version":27},"Microsoft","Azure.ResourceManager.BotService","1.0.0","Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: \"Bot Service\", \"BotResource\", \"Azure Bot\", \"DirectLine channel\", \"Teams channel\", \"bot management .NET\", \"create bot\".\n","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill azure-mgmt-botservice-dotnet",{"tool":41,"command":42},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill azure-mgmt-botservice-dotnet",{"tool":44,"command":45},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill azure-mgmt-botservice-dotnet","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fazure-mgmt-botservice-dotnet\u002FSKILL.md",true,[],[50,58,65,72,79,87],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":57},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":57},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":57},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":57},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":57},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":57},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]