如何阻止Microsoft Entra ID用户访问Teams Explorer避免获取试用许可证
阻止Microsoft Entra ID用户访问Teams Explorer以避免自动获取试用许可证
方法1:用Entra ID条件访问策略限制Teams访问
- 新建条件访问策略,选定需要限制的用户/组
- 云应用选择Microsoft Teams
- 授予控制设置为阻止访问
- 可添加例外(比如管理员账户),防止误锁自己
- 保存并启用策略
方法2:PowerShell禁用用户Teams服务计划
如果只想限制Teams Explorer,可直接禁用用户的Teams服务计划,就算有基础许可证也无法启用:
# 连接Microsoft Graph PowerShell Connect-MgGraph -Scopes User.ReadWrite.All, Organization.Read.All # 获取用户许可证信息 $user = Get-MgUser -UserId "user@domain.com" -Select AssignedLicenses $license = $user.AssignedLicenses | Where-Object { $_.SkuId -eq "<Teams_SKU_ID>" } # 禁用Teams服务计划 $disabledPlans = $license.DisabledPlans + "<Teams_Service_Plan_ID>" Set-MgUserLicense -UserId "user@domain.com" -AddLicenses @{} -RemoveLicenses @() -AssignedLicenses @(@{SkuId = $license.SkuId; DisabledPlans = $disabledPlans})
提示:
<Teams_SKU_ID>和<Teams_Service_Plan_ID>可通过Get-MgSubscribedSku命令获取租户内对应ID
方法3:关闭租户Teams试用许可自动分配
在Microsoft 365管理中心操作:
- 进入账单 > 许可
- 找到试用许可板块,关闭允许用户自行申请试用许可的开关
- 这样用户访问Teams时无法自动获取试用许可证
内容的提问来源于stack exchange,提问作者lakshmi
相关产品推荐
相关产品推荐

