我正在尝试使用azure自动化运行。我已经检查了我所有的订阅,Runas帐户中都有“贡献者”。不过,我仍然收到以下错误。我知道错误说明特权不足,但是帐户在我的所有订阅中都有“贡献者”,这不可能是真的,对吧?
:没有足够的权限来完成操作.线:41字符:21
Get-AzADApplication
- CategoryInfo : InvalidOperation: (:) [Get-AzADApplication], Exception
- FullyQualifiedErrorId : Microsoft.Azure.Commands.ActiveDirectory.GetAzureADApplicationCommand
这里是我的代码的第一个小片段,它就是不能通过Get-AzADApplication
# Ensures you do not inherit an AzContext in your runbook
Disable-AzContextAutosave –Scope Process
$connection = Get-AutomationConnection -Name AzureRunAsConnection
while(!($connectionResult) -and ($logonAttempt -le 10))
{
$LogonAttempt++
# Logging in to Azure...
$connectionResult = Connect-AzAccount `
-ServicePrincipal `
-Tenant $connection.TenantID `
-ApplicationId $connection.ApplicationID `
-CertificateThumbprint $connection.CertificateThumbprint
Start-Sleep -Seconds 30
}
#Get Applications
$Applications = Get-AzADApplication
$ServicePrincipals = Get-AzADServicePrincipal
发布于 2021-03-24 15:49:55
缴款者的作用是不够的。你需要管理员特权。
您需要的最小角色是应用程序管理员。
https://stackoverflow.com/questions/66783796
复制相似问题