Connecting to SQL Server through Active Directory user in Azure Virtual Machine
<p>I am a beginer in Azure and I have been trying to accomplish below scenario task:</p>

<p>I have created two Virtual Machine say vm1 and vm2.</p>

<p>Virtual Machine (vm1) where I have installed: </p>

<ul>
<li>ADDS (Active Directory Domain Service): Window server 2012 R2</li>
<li>Domain Name: <code>TestDomain</code> (example)</li>
<li>ip: <code>10.0.0.79</code></li>
<li>user: <code>testuser@TestDomain.onmicrosoft.com</code></li>
</ul>

<p>In Virtual Machine (vm2), I have installed MS SQL server 2015. It is running and has a database on it. Then I have added the Domain name and configured DNS on vm2 with respect to vm1 (used same domain name: <code>TestDomain</code> and ip: <code>10.0.0.79</code>).</p>

<p>In vm2, from MS SQL, login with windows authenticaton mode, then Security >> Logins, right click new user then Search (user: <code>testuser@TestDomain.onmicrosoft.com</code>), then give the permission to the database for user from vm1.</p>

<p>Search that user from entire directory, then fetch, then gave database mapping and login entire permission to that user.</p>

<p>User appears: <code>TestDomain\testuser</code>.</p>

<p>Now when I try to login to database using user as: <code>TestDomain\testuser</code> or <code>testuser</code> or <code>testuser@TestDomain.onmicrosoft.com</code> and using same password that was used during creating in vm1, then I could not login.   </p>

<p>I have looked several links, but could not find a solution. Thank you in advance.</p>