title: Fetching Azure Subscription ID & Deployment Slot (really fast)
body: <p>As a follow up to my question about <a href="https://stackoverflow.com/questions/7109944/events-that-fire-when-a-hosted-services-deployment-slot-changes-swap-vip">Deployment Status</a>, I'd like to ask if there is a <strong>fast way</strong> to find:</p>
  
  <ul>
  <li>Current Subscription Id</li>
  <li>The current deployment slot the role is in (Staging/Production)</li>
  </ul>
  
  <p>I am currently using the Management API, which is a bit slow, but I don't want to cache it for long because I can't be sure the cache will invalidate upon the slot swap.</p>