title: Azure SQL Database - Active Directory integrated authentication
body: <p>I would like to achieve following:</p>
  
  <p>Avoid <strong>SQL authentication</strong> on Azure for my production configuration and use <strong>Active Directory integrated authentication</strong></p>
  
  <p>When I go to the connection string section of Azure and copy following connection string:</p>
  
  <pre><code>Server=[my server name];Initial Catalog=[my db name];Persist Security Info=False;User ID=[my user name];MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication="Active Directory Integrated";
  </code></pre>
  
  <p>and try using it I get following exception:</p>
  
  <blockquote>
    <p>Exception message: Cannot use 'Authentication=Active Directory
    Integrated' with 'User ID', 'UID', 'Password' or 'PWD' connection
    string keywords., Exception stacktrace:    at
    System.Data.SqlClient.SqlConnectionString..ctor(String
    connectionString)    at
    System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String
    connectionString, DbConnectionOptions previous)    at
    System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey
    key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions&amp;
    userConnectionOptions)    at
    System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey
    key)</p>
  </blockquote>
  
  <p>As I have very limited db admin/infrastructure experience I am unaware why the 'User ID' breaks everything when it is explicitly listed in the connection string I get on Azure.</p>
  
  <p>A few things to note:</p>
  
  <ul>
  <li>SQL authentication works</li>
  <li>I have Active Directory admin set </li>
  </ul>