Azure Active Directory sign in with Microsoft Account
<p>I'm using this sample <a href="https://github.com/Azure-Samples/active-directory-dotnet-native-headless" rel="nofollow">https://github.com/Azure-Samples/active-directory-dotnet-native-headless</a></p>

<p>Many of the samples, this one inclusive, say:</p>

<blockquote>
  <p>This sample will not work with a Microsoft account, so if you signed in to the Azure portal with a Microsoft account and have never created a user account in your directory before, you need to do that now.</p>
</blockquote>

<p>When I log in with my Microsoft account, the exception I get is:</p>

<pre><code>AADSTS50020: User account '{mymicrosoftaccount}@{domain.com}'
from identity provider 'https://sts.windows.net/00000000-0000-0000-0000-000000000000/'
does not exist in tenant '{my-tenant}' and cannot access the application
'00000000-0000-0000-0000-000000000000' in that tenant.
The account needs to be added as an external user in the tenant first. 
Sign out and sign in again with a different Azure Active Directory user account.
</code></pre>

<p>What would I need to do to allow logging in with my Microsoft account? At the moment, my authority is <code>https://login.microsoftonline.com/{mytenant}</code> Would I have to provide the user with an option to log in with a Microsoft Account, or the Active Directory account. If so, what authority do I use to allow logins with Microsoft Accounts?</p>