title: Office365 outlook add in - Get tenant programmatically
body: <p>I'm currently in the process of developing an outlook add-in. So far, I've got everything working, and the add-in works perfectly on MY tenant. The problem is that I don't know how to get the tenant programmatically (so the add-in will dynamically get tenant <code>TestTenant</code> instead of hardcoding MY tenant <code>DummyTenant</code>).</p>
  
  <p><strong>Home.js</strong></p>
  
  <pre><code>baseEndpoint = 'https://' + tenant + '.sharepoint.com/';
  </code></pre>
  
  <p>This is my variable <code>baseEndpoint</code>. Notice the tenant, this comes straight from the <code>Config.js</code></p>
  
  <p><strong>Config.js</strong></p>
  
  <pre><code>var tenant = 'radoorworkpoint';
  </code></pre>
  
  <p>If anyone know how to do this, I appreciate it.</p>