title: DacServices ExportBacpac Exception with Windows Users
body: <p>I'm using the Data-tier Application Framework (DACFx) in an attempt to export schema and data from a subset of the tables in my database. </p>
  
  <pre><code>var dacServices = new DacServices(connectionString);
  dacServices.ExportBacpac("database.bacpac", database, tables);
  </code></pre>
  
  <p>I know there are some limitations on what is supported, and I've addressed the issues that had to do with the code (stored procedures, etc). However, I've hit a block with Windows Users/Logins. I'm not sure how I can get around it.</p>
  
  <p>The exception details:</p>
  
  <pre><code>One or more unsupported elements were found in the schema used as part of a data package.
  Error SQL71564: The element User: [Domain\User] has property AuthenticationType set to a value that is not supported in Microsoft Azure SQL Database v12.
  Error SQL71564: The element Login: [Domain\User] has property IsMappedToWindowsLogin set to a value that is not supported in Microsoft Azure SQL Database v12.
  </code></pre>
  
  <p>I realize Windows Authentication is not supported in Azure SQL. <strong>But is there not an option to simply ignore Users, Logins, etc.?</strong></p>
  
  <p>I've read various posts that claim you can just DROP the logins and users. and then re-CREATE them following the export. Unfortunately, I can't do that in my case since these objects are being used for active connections. I've also read that some people solved this by doing backup/restore and then dropping the users on the secondary. That could potentially work but surely there's a better way with less effort. </p>
  
  <p>De-compiling the code, I can see where the ExportBacpac method creates:</p>
  
  <pre><code>DacExtractOptions extractOptions = new DacExtractOptions()
        {
          EnforceSqlAzureRestrictions = true,
          IgnorePermissions = false,
          VerifyExtraction = true,
          ExtractNonApplicationDatabaseScopedElements = true
        };
  </code></pre>
  
  <p>Of course, this is all private, internal, etc. Shame, I'd like to turn EnfoceSqlAzureRestrictions off!</p>
  
  <p>Any ideas?</p>