title: How do i configure Yii2 to connect to SQLSRV using windows authentication?
body: <p>i need to set up a yii2 site to connect to a sql server database which is locked behind windows authentication. normally with sql server auth (essentially username/ password) i'd do it like this.</p>
  
  <pre><code>return [
      'class' =&gt; 'yii\db\Connection',
      'dsn' =&gt; 'sqlsrv:Server=serverip;Database=dbname',
      'username' =&gt; 'dbuser'
      'password' =&gt; 'samplePassword',
      'charset' =&gt; 'utf8',
      'enableSchemaCache' =&gt; true,
  ];
  </code></pre>
  
  <p>the server configuration would look something like this i think, but this does not work.(basically the same except using windows login / password, since windows authentication gives access to a windows user and then they can just log in to the SQL server database in SSMS without any additional credentials)</p>
  
  <pre><code>return [
      'class' =&gt; 'yii\db\Connection',
      'dsn' =&gt; 'sqlsrv:Server=serverip;Database=dbname',
      'username' =&gt; 'DOMAIN\windowsusername'
      'password' =&gt; 'windowsPassword',
      'charset' =&gt; 'utf8',
      'enableSchemaCache' =&gt; true,
  ];
  </code></pre>
  
  <p>Is this even possible? how would one go about configuring this? ( i can't seem to find any official yii2 docs on this)</p>