{
  "schema": "https://ai-atoms.com/schemas/skill-v1.json",
  "type": "skill",
  "id": "skill/azure-mgmt-botservice-py",
  "version": "1.0.1",
  "name": "Azure Mgmt Botservice Py",
  "description": "Azure Bot Service Management SDK for Python. Use for creating, managing, and configuring Azure Bot Service resources.\nTriggers: \"azure-mgmt-botservice\", \"AzureBotService\", \"bot management\", \"conversational AI\", \"bot channels\".",
  "system_prompt_fragment": "# Azure Bot Service Management SDK for Python\n\nManage Azure Bot Service resources including bots, channels, and connections.\n\n## Installation\n\n```bash\npip install azure-mgmt-botservice\npip install azure-identity\n```\n\n## Environment Variables\n\n```bash\nAZURE_SUBSCRIPTION_ID=<your-subscription-id>\nAZURE_RESOURCE_GROUP=<your-resource-group>\n```\n\n## Authentication\n\n```python\nfrom azure.identity import DefaultAzureCredential\nfrom azure.mgmt.botservice import AzureBotService\nimport os\n\ncredential = DefaultAzureCredential()\nclient = AzureBotService(\n    credential=credential,\n    subscription_id=os.environ[\"AZURE_SUBSCRIPTION_ID\"]\n)\n```\n\n## Create a Bot\n\n```python\nfrom azure.mgmt.botservice import AzureBotService\nfrom azure.mgmt.botservice.models import Bot, BotProperties, Sku\nfrom azure.identity import DefaultAzureCredential\nimport os\n\ncredential = DefaultAzureCredential()\nclient = AzureBotService(\n    credential=credential,\n    subscription_id=os.environ[\"AZURE_SUBSCRIPTION_ID\"]\n)\n\nresource_group = os.environ[\"AZURE_RESOURCE_GROUP\"]\nbot_name = \"my-chat-bot\"\n\nbot = client.bots.create(\n    resource_group_name=resource_group,\n    resource_name=bot_name,\n    parameters=Bot(\n        location=\"global\",\n        sku=Sku(name=\"F0\"),  # Free tier\n        kind=\"azurebot\",\n        properties=BotProperties(\n            display_name=\"My Chat Bot\",\n            description=\"A conversational AI bot\",\n            endpoint=\"https://my-bot-app.azurewebsites.net/api/messages\",\n            msa_app_id=\"<your-app-id>\",\n            msa_app_type=\"MultiTenant\"\n        )\n    )\n)\n\nprint(f\"Bot created: {bot.name}\")\n```\n\n## Get Bot Details\n\n```python\nbot = client.bots.get(\n    resource_group_name=resource_group,\n    resource_name=bot_name\n)\n\nprint(f\"Bot: {bot.properties.display_name}\")\nprint(f\"Endpoint: {bot.properties.endpoint}\")\nprint(f\"SKU: {bot.sku.name}\")\n```\n\n## List Bots in Resource Group\n\n```python\nbots = client.bots.list_by_resource_group(resource_group_name=resource_group)\n\nfor bot in bots:\n    print(f\"Bot: {bot.name} - {bot.properties.display_name}\")\n```\n\n## List All Bots in Subscription\n\n```python\nall_bots = client.bots.list()\n\nfor bot in all_bots:\n    print(f\"Bot: {bot.name} in {bot.id.split('/')[4]}\")\n```\n\n## Update Bot\n\n```python\nbot = client.bots.update(\n    resource_group_name=resource_group,\n    resource_name=bot_name,\n    properties=BotProperties(\n        display_name=\"Updated Bot Name\",\n        description=\"Updated description\"\n    )\n)\n```\n\n## Delete Bot\n\n```python\nclient.bots.delete(\n    resource_group_name=resource_group,\n    resource_name=bot_name\n)\n```\n\n## Configure Channels\n\n### Add Teams Channel\n\n```python\nfrom azure.mgmt.botservice.models import (\n    BotChannel,\n    MsTeamsChannel,\n    MsTeamsChannelProperties\n)\n\nchannel = client.channels.create(\n    resource_group_name=resource_group,\n    resource_name=bot_name,\n    channel_name=\"MsTeamsChannel\",\n    parameters=BotChannel(\n        location=\"global\",\n        properties=MsTeamsChannel(\n            properties=MsTeamsChannelProperties(\n                is_enabled=True\n            )\n        )\n    )\n)\n```\n\n### Add Direct Line Channel\n\n```python\nfrom azure.mgmt.botservice.models import (\n    BotChannel,\n    DirectLineChannel,\n    DirectLineChannelProperties,\n    DirectLineSite\n)\n\nchannel = client.channels.create(\n    resource_group_name=resource_group,\n    resource_name=bot_name,\n    channel_name=\"DirectLineChannel\",\n    parameters=BotChannel(\n        location=\"global\",\n        properties=DirectLineChannel(\n            properties=DirectLineChannelProperties(\n                sites=[\n                    DirectLineSite(\n                        site_name=\"Default Site\",\n                        is_enabled=True,\n                        is_v1_enabled=False,\n                        is_v3_enabled=True\n                    )\n                ]\n            )\n        )\n    )\n)\n```\n\n### Add Web Chat Channel\n\n```python\nfrom azure.mgmt.botservice.models import (\n    BotChannel,\n    WebChatChannel,\n    WebChatChannelProperties,\n    WebChatSite\n)\n\nchannel = client.channels.create(\n    resource_group_name=resource_group,\n    resource_name=bot_name,\n    channel_name=\"WebChatChannel\",\n    parameters=BotChannel(\n        location=\"global\",\n        properties=WebChatChannel(\n            properties=WebChatChannelProperties(\n                sites=[\n                    WebChatSite(\n                        site_name=\"Default Site\",\n                        is_enabled=True\n                    )\n                ]\n            )\n        )\n    )\n)\n```\n\n## Get Channel Details\n\n```python\nchannel = client.channels.get(\n    resource_group_name=resource_group,\n    resource_name=bot_name,\n    channel_name=\"DirectLineChannel\"\n)\n```\n\n## List Channel Keys\n\n```python\nkeys = client.channels.list_with_keys(\n    resource_group_name=resource_group,\n    resource_name=bot_name,\n    channel_name=\"DirectLineChannel\"\n)\n\n# Access Direct Line keys\nif hasattr(keys.properties, 'properties'):\n    for site in keys.properties.properties.sites:\n        print(f\"Site: {site.site_name}\")\n        print(f\"Key: {site.key}\")\n```\n\n## Bot Connections (OAuth)\n\n### Create Connection Setting\n\n```python\nfrom azure.mgmt.botservice.models import (\n    ConnectionSetting,\n    ConnectionSettingProperties\n)\n\nconnection = client.bot_connection.create(\n    resource_group_name=resource_group,\n    resource_name=bot_name,\n    connection_name=\"graph-connection\",\n    parameters=ConnectionSetting(\n        location=\"global\",\n        properties=ConnectionSettingProperties(\n            client_id=\"<oauth-client-id>\",\n            client_secret=\"<oauth-client-secret>\",\n            scopes=\"User.Read\",\n            service_provider_id=\"<service-provider-id>\"\n        )\n    )\n)\n```\n\n### List Connections\n\n```python\nconnections = client.bot_connection.list_by_bot_service(\n    resource_group_name=resource_group,\n    resource_name=bot_name\n)\n\nfor conn in connections:\n    print(f\"Connection: {conn.name}\")\n```\n\n## Client Operations\n\n| Operation | Method |\n|-----------|--------|\n| `client.bots` | Bot CRUD operations |\n| `client.channels` | Channel configuration |\n| `client.bot_connection` | OAuth connection settings |\n| `client.direct_line` | Direct Line channel operations |\n| `client.email` | Email channel operations |\n| `client.operations` | Available operations |\n| `client.host_settings` | Host settings operations |\n\n## SKU Options\n\n| SKU | Description |\n|-----|-------------|\n| `F0` | Free tier (limited messages) |\n| `S1` | Standard tier (unlimited messages) |\n\n## Channel Types\n\n| Channel | Class | Purpose |\n|---------|-------|---------|\n| `MsTeamsChannel` | Microsoft Teams | Teams integration |\n| `DirectLineChannel` | Direct Line | Custom client integration |\n| `WebChatChannel` | Web Chat | Embeddable web widget |\n| `SlackChannel` | Slack | Slack workspace integration |\n| `FacebookChannel` | Facebook | Messenger integration |\n| `EmailChannel` | Email | Email communication |\n\n## Best Practices\n\n1. **Use DefaultAzureCredential** for authentication\n2. **Start with F0 SKU** for development, upgrade to S1 for production\n3. **Store MSA App ID/Secret securely** — use Key Vault\n4. **Enable only needed channels** — reduces attack surface\n5. **Rotate Direct Line keys** periodically\n6. **Use managed identity** when possible for bot connections\n7. **Configure proper CORS** for Web Chat channel\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.",
  "applicable_domains": [
    "devops"
  ],
  "category": "devops",
  "invocation": [
    "/azure-mgmt-botservice-py"
  ],
  "authored_by": "claudeskills.in community",
  "source_url": "https://claudeskills.in/skill/azure-mgmt-botservice-py",
  "provenance": {
    "source": "claudeskills.in",
    "source_url": "https://claudeskills.in/skill/azure-mgmt-botservice-py",
    "license": "unknown",
    "imported_at": "2026-09-03",
    "notes": "Aggregated by claudeskills.in from community GitHub lists."
  },
  "tags": [
    "claudeskills",
    "devops"
  ],
  "lifecycle": "draft"
}