You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过PowerShell命令禁用Azure Bot的Direct Line通道增强身份验证选项

通过PowerShell禁用Azure Bot Direct Line通道的增强身份验证

操作步骤

  1. 安装并导入Azure Bot服务模块
    如果未安装Az.BotService模块,先执行以下命令:
Install-Module -Name Az.BotService -Force -AllowClobber
Import-Module Az.BotService
  1. 登录Azure账户
    连接到你的Azure订阅:
Connect-AzAccount

若需指定租户,添加-TenantId <你的租户ID>参数。

  1. 获取Bot及Direct Line通道信息
    先定位目标Bot资源:
$bot = Get-AzBotService -ResourceGroupName <资源组名称> -Name <Bot名称>

再获取Direct Line通道的配置:

$directLineChannel = Get-AzBotChannel -ResourceGroupName <资源组名称> -BotName <Bot名称> -ChannelName DirectLine
  1. 禁用增强身份验证
    修改通道配置中的增强身份验证开关:
$directLineChannel.Properties.EnhancedAuthEnabled = $false
  1. 更新通道配置
    将修改后的配置提交到Azure:
Set-AzBotChannel -ResourceGroupName <资源组名称> -BotName <Bot名称> -ChannelName DirectLine -Channel $directLineChannel

验证设置

执行以下命令确认增强身份验证已禁用:

Get-AzBotChannel -ResourceGroupName <资源组名称> -BotName <Bot名称> -ChannelName DirectLine | Select-Object -ExpandProperty Properties | Select-Object EnhancedAuthEnabled

返回结果应为False。

内容的提问来源于stack exchange,提问作者Oleh Volosnik

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 18:20:38