title: Get all domains for a tenant through REST API
body: <p>I want to know if there is a way to retrieve the registered domain(s) for a tenant through REST API for Sharepoint/Office365.</p>
  
  <p>Consider this scenario;</p>
  
  <p>I have a tenant named <strong>abc.pqr</strong> and url for the "my" site(OneDrive) is <strong>abc-my.sharepoint.com</strong>.</p>
  
  <p>Now when I create a user for this tenant, the UI panel gives the option to select a domain for this account. Available options are;</p>
  
  <pre><code>1) @abc.pqr
  2) @abc.onmicrosoft.com
  </code></pre>
  
  <p>Now, the problem is, if I have a user of this sort >>> <strong>testUser@abc.onmicrosoft.com</strong>, how do I findout the registered domain for this tenant? Which in my case is <strong>abc.pqr</strong>. </p>
  
  <p>Is there a way to find this through REST API?</p>