Automate Connect-AzureAD using powershell in Azure Devops
问题 I am unable to automate Connect-AzureAD powershell command. In order to get user objectID, I need to automate the operation Connect-AzureAD and for that i used this code: Connect-AzureAD -TenantId $tenantId -Verbose $userObjectID = $(Get-AzureADUser -Filter "UserPrincipalName eq '$Owner'").ObjectId The operation stuck at the Connect-AzureAD. how to resolve this? 回答1: I found the solution and test it. I'm running this task in an Azure Devops pipeline; this tasks is called "Azure PowerShell