title: Azure Resource Manager - Get publish username and password of an AzureWebApp
body: <p>I can get the publish settings use the following method:</p>
  
  <pre><code>$website = Get-AzureWebSite -Name $webSiteName
  
  $websitePreProd = ($website | ?{ $_.Name -like "*Preprod)" })
  
  $siteProperties = $websitePreProd.SiteProperties.Properties
  
  $url = ($siteProperties | ?{ $_.Name -eq "RepositoryURI" }).Value.ToString() + "/MsDeploy.axd"
  
  $userName = ($siteProperties | ?{ $_.Name -eq "PublishingUsername" }).Value
  
  $pw = ($siteProperties | ?{ $_.Name -eq "PublishingPassword" }).Value
  </code></pre>
  
  <p>But ideally I want to use ARM via:</p>
  
  <pre><code>$existingSlot = Get-AzureWebApp -Name $websiteName -ResourceGroupName $resourcegroup -Slot "PreProd" -ErrorAction SilentlyContinue
  </code></pre>
  
  <p>How do I get URL, username and password using ARM?</p>