Azure Automation with Reader UMI 下的Get-AzADUser:“权限不足,无法完成操作”

问题描述 投票:0回答:0

我有一个带有 PowerShell 运行手册的 Azure 自动化帐户,该帐户具有:

$AzureContext = (Connect-AzAccount -Identity).context
Get-AzADUser -UserPrincipalName '<[email protected]>'

此外,我在与自动化帐户相同的订阅和资源组中有一个用户分配的托管标识,它在资源组范围内具有读者角色分配。此 UMI 应用于自动化帐户(通过 | Identity -> User-assigned -> +Add)。

当我在门户中运行上述 runbook 时,我在 Get-AzADUser 上收到错误,详细信息 [Authorization_RequestDenied]:完成操作的权限不足。 和作业流详细信息:

Az.MSGraph.internal\Get-AzADUser:权限不足,无法完成操作。在 C:\Modules\Global\Az.Resources\MSGraph.Autores

azure powershell azure-automation
© www.soinside.com 2019 - 2024. All rights reserved.