title: Cannot Add Managed Identity to Synapse Pool
body: <p>I am running an Azure Synapse workflow through the Synapse studio and running into this error:</p>
  <pre><code>{
      &quot;errorCode&quot;: &quot;2200&quot;,
      &quot;message&quot;: &quot;ErrorCode=FailedDbOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Please make sure SQL DW has access to ADLS Gen2 account,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=Managed Service Identity has not been enabled on this server. Please enable Managed Service Identity and try again.,Source=.Net SqlClient Data Provider,SqlErrorNumber=105096,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=105096,State=1,Message=Managed Service Identity has not been enabled on this server. Please enable Managed Service Identity and try again.,},],'&quot;,
      &quot;failureType&quot;: &quot;UserError&quot;,
      &quot;target&quot;: &quot;Copy data1&quot;,
      &quot;details&quot;: []
  }
  </code></pre>
  <p>If I go into Azure Powershell and inspect the pool, I see that this is substantiated by the <code>null</code> entry in <code>Identity</code>:</p>
  <pre><code>ResourceGroupName        : workspacemanagedrg-c6475066-bbe3-4c02-866c-7556d5e92e0b
  ServerName               : &lt;mydw&gt;
  Location                 : eastus2
  SqlAdministratorLogin    : &lt;myadmin&gt;
  SqlAdministratorPassword : &lt;mypw&gt;
  ServerVersion            : 12.0
  Tags                     : {}
  Identity                 :
  FullyQualifiedDomainName : &lt;mydw&gt;.database.windows.net
  </code></pre>
  <p>There are two things that are peculiar about this:</p>
  <ol>
  <li>My Synapse workspace has a managed identity associated with it already:
  <a href="https://i.stack.imgur.com/MG34L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MG34L.png" alt="enter image description here" /></a></li>
  </ol>
  <ol start="2">
  <li>I'm getting a permission denied when trying to run the Powershell command as documented in <a href="https://stackoverflow.com/questions/59240875/manager-identity-error-when-running-a-pipeline-in-data-factory-with-staging-blob/59383462#59383462">this question</a> which says</li>
  </ol>
  <blockquote>
  <p>Set-AzSqlServer: The client 'me@contoso.com' with object id 'guid' has permission to perform action 'Microsoft.Sql/servers/write' on scope '/subscriptions/mysubscription/resourceGroups/myrg/providers/Microsoft.Sql/servers/mydw'; however, the access is denied because of the deny assignment with name 'c6475066-bbe2-4c03-866c-7556d5e92e9b' and Id 'c6475066bbe24c03866c7556d5e92e9b' at scope '/subscriptions/mysubscription/resourceGroups/myrg'.</p>
  </blockquote>
  <p>I have verified that this Managed Identity does have access to my data source (ADLS Gen2) and when I test the connections in the studio, they all work.</p>
  <p>How do I assign the managed identity from my Synapse workspace to my sql pool that I've created?</p>