title: ACS with custom home realm discovery page, how do I "detect" Azure AD vs Microsoft Account?
body: <p>I'm customizing an <a href="http://msdn.microsoft.com/en-us/library/gg185963.aspx" rel="nofollow">ACS home realm discovery page</a> and want to accommodate users who have either a "microsoft account" (aka LiveID/Passport) or a Office365/Azure Active Directory account.</p>
  
  <p>In this situation, it's possible for the following workflow to happen (as far as I understand it)</p>
  
  <ol>
  <li>User logs in using ACS custom page</li>
  <li>User selects "Microsoft Account" </li>
  <li>User types in their company / corporate ID</li>
  <li>The HRD process at <a href="http://portal.microsoftonline.com" rel="nofollow">http://portal.microsoftonline.com</a> redirects them to their ADFS server</li>
  <li>Their ADFS server redirects them to their company.</li>
  </ol>
  
  <p>Once sign-in passes (or fails) the login would cascade back to the ACS page.</p>
  
  <p>What is the most efficient way (for the end user) to integrate Azure ACS, with Azure Active Directory / Office 365, with a custom HRD page that I create?</p>
  
  <p>Or more plainly, is there a JSON web service that I can query to determine if a given domain or account exists within the "Microsoft Account/LiveID" world, and also check AzureAD for the same thing.</p>