title: How do I get accounts from Azure AD?
body: <p>I have a nice Azure Active Directory set up with a dozen users. (All me!) So I have a Tenant ID, client ID and Client Secret.<br>
  I am also working on a simple console application that will function as a public client for this directory. This client also holds a list of usernames and passwords as this is just meant as a simple experiment. Not secure, I know. <em>But I first need to understand how it works</em>...  </p>
  
  <p>I do this: </p>
  
  <pre><code>IConfidentialClientApplication client = ConfidentialClientApplicationBuilder
                                    .CreateWithApplicationOptions(options).Build();
  </code></pre>
  
  <p>And this creates my client app. Works fine.<br>
  I also get a token using "<a href="https://graph.microsoft.com/.default" rel="nofollow noreferrer">https://graph.microsoft.com/.default</a>" and can use this to get all users as JSON: </p>
  
  <pre><code>string result = await GetHttpContentWithToken("https://graph.microsoft.com/v1.0/users", 
                                                 token.AccessToken);
  </code></pre>
  
  <p>Although I might want it to be more user-friendly, JSON is fine for now.  </p>
  
  <p>How can I check if user  is an authorized user?<br>
  And no, I don't want complex solutions that require various nuget packages. Just a plain and simple step-by-step explanation. I could probably Google this but I ended up with thousands of results and none were helpful... This should be easy, right?</p>
  
  <p>[EDIT] I first wanted to get a list of users nut that failed because of a typo... (There's a dot before 'default'...)</p>