What permissions does an Azure service principal need to call the New-AzSubscriptionAlias PowerShell function?
问题 I'm trying to create subscriptions through an Azure DevOps pipeline on a hosted agent running as a service principal and am receiving the error: New-AzSubscriptionAlias: /home/vsts/work/1/s/Azure.Automation/Subscriptions/Create-AzureSubscription.ps1:190 Line | 190 | $subscription = New-AzSubscriptionAlias ` | ~~~~~~~~~~~~~~~~~~~~~~~~~ | Operation returned an invalid status code 'Unauthorized' How do I grant the service principal the required access? 回答1: As it is written here in