I have a release pipeline which is calling a PowerShell script and it is having 'Select-AzureSubscription' statement (In a loop I have to assign different subscriptions as current and do some process). When it runs, I am getting the below error as I have not added 'Add-AzureAccount'.
Select-AzureSubscription : The subscription name doesn't exist.
Is there any way to authenticate or execute Add-AzureAccount using the Pipeline access token.
Code:-
Select-AzureSubscription -SubscriptionName $Subscription -Current
CloudServices = Get-AzureService | select ServiceName



