{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/1232","repository_url":"https://api.github.com/repos/Microsoft/vso-agent-tasks","labels_url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/1232/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/1232/comments","events_url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/1232/events","html_url":"https://github.com/Microsoft/vso-agent-tasks/issues/1232","id":133385837,"number":1232,"title":"Get-AzureWebSite throws error if VSO doesn't have access to its Azure subscription","user":{"login":"abatishchev","id":351644,"avatar_url":"https://avatars.githubusercontent.com/u/351644?v=3","gravatar_id":"","url":"https://api.github.com/users/abatishchev","html_url":"https://github.com/abatishchev","followers_url":"https://api.github.com/users/abatishchev/followers","following_url":"https://api.github.com/users/abatishchev/following{/other_user}","gists_url":"https://api.github.com/users/abatishchev/gists{/gist_id}","starred_url":"https://api.github.com/users/abatishchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abatishchev/subscriptions","organizations_url":"https://api.github.com/users/abatishchev/orgs","repos_url":"https://api.github.com/users/abatishchev/repos","events_url":"https://api.github.com/users/abatishchev/events{/privacy}","received_events_url":"https://api.github.com/users/abatishchev/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-13T01:51:13Z","updated_at":"2016-02-16T20:21:18Z","closed_at":"2016-02-16T20:21:18Z","body":"Here's the build step output:\r\n\r\n> 2016-02-13T01:34:38.9593700Z Executing the powershell script: D:\\agent\\tasks\\AzureWebPowerShellDeployment\\1.0.23\\Publish-AzureWebDeployment.ps1\r\n> 2016-02-13T01:34:39.1043680Z Looking for Azure PowerShell module at C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\PowerShell\\ServiceManagement\\Azure\\Azure.psd1\r\n> 2016-02-13T01:34:39.7053406Z AzurePSCmdletsVersion= 1.0.1\r\n> 2016-02-13T01:34:39.7303401Z Get-ServiceEndpoint -Name <id> -Context Microsoft.TeamFoundation.DistributedTask.Agent.Worker.Common.TaskContext\r\n> 2016-02-13T01:34:50.5152940Z subscription= PIAzurePilot\r\n> 2016-02-13T01:34:50.5152940Z Get-X509Certificate -CredentialsXml <xml>\r\n> 2016-02-13T01:34:50.5552712Z azureSubscriptionId= <id>\r\n> 2016-02-13T01:34:50.5552712Z azureSubscriptionName= <name>\r\n> 2016-02-13T01:34:50.5552712Z azureServiceEndpoint= https://management.core.windows.net/\r\n> 2016-02-13T01:34:50.5602714Z Set-AzureSubscription -SubscriptionName <name> -SubscriptionId <id> -Certificate <cert> -Environment AzureCloud\r\n> 2016-02-13T01:34:50.7102701Z Select-AzureSubscription -SubscriptionId <id>\r\n> 2016-02-13T01:34:50.7402709Z ConnectedServiceName= <id>\r\n> 2016-02-13T01:34:50.7402709Z WebSiteName= <name>\r\n> 2016-02-13T01:34:50.7402709Z Package= D:\\Builds\\7\\a\\**\\*.zip\r\n> 2016-02-13T01:34:50.7402709Z Slot= \r\n> 2016-02-13T01:34:50.7402709Z AdditionalArguments= \r\n> 2016-02-13T01:34:50.7402709Z packageFile= Find-Files -SearchPattern D:\\Builds\\7\\a\\**\\*.zip\r\n> 2016-02-13T01:34:50.7402709Z packageFile= D:\\Builds\\7\\a\\drop\\Api\\Api.zip\r\n> 2016-02-13T01:34:50.7452699Z Get-AzureWebSite -Name <name> -ErrorAction SilentlyContinue -ErrorVariable azureWebSiteError -Slot production\r\n> 2016-02-13T01:34:53.2352542Z ##[warning]System.NullReferenceException: Object reference not set to an instance of an object.\r\n> 2016-02-13T01:34:53.2352542Z ##[warning]   at Microsoft.WindowsAzure.Commands.Websites.GetAzureWebsiteCommand.Do(Action call)\r\n> 2016-02-13T01:34:53.2352542Z ##[warning]   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzureSMCmdlet.ProcessRecord()\r\n> 2016-02-13T01:34:53.2352542Z New-AzureWebSite -Name <name> -Location West US -Slot production\r\n> 2016-02-13T01:35:01.4352281Z ##[error]Conflict: Website with given name <name> already exists.\r\n> 2016-02-13T01:35:01.4352281Z Publish-AzureWebsiteProject -Name \"<name>\" -Package \"D:\\Builds\\7\\a\\drop\\Api\\Api.zip\" -Slot \"production\"  -ErrorVariable publishAzureWebsiteError\r\n> 2016-02-13T01:35:04.3602062Z ##[error]The website <name> was not found. Please specify a valid website name.\r\n> 2016-02-13T01:35:04.3651834Z ##[warning]Cannot get website, deployment status is not updated\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/comments/184861461","html_url":"https://github.com/Microsoft/vso-agent-tasks/issues/1232#issuecomment-184861461","issue_url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/1232","id":184861461,"user":{"login":"yaananth","id":12280011,"avatar_url":"https://avatars.githubusercontent.com/u/12280011?v=3","gravatar_id":"","url":"https://api.github.com/users/yaananth","html_url":"https://github.com/yaananth","followers_url":"https://api.github.com/users/yaananth/followers","following_url":"https://api.github.com/users/yaananth/following{/other_user}","gists_url":"https://api.github.com/users/yaananth/gists{/gist_id}","starred_url":"https://api.github.com/users/yaananth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaananth/subscriptions","organizations_url":"https://api.github.com/users/yaananth/orgs","repos_url":"https://api.github.com/users/yaananth/repos","events_url":"https://api.github.com/users/yaananth/events{/privacy}","received_events_url":"https://api.github.com/users/yaananth/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T20:21:18Z","updated_at":"2016-02-16T20:21:18Z","body":"Look #526"}}