title: Linking Synapse with user assigned managed identity to the Data Factory - invalid credential reference
body: <p>I am trying to link Synapse to the Data Factory using <code>AzureSqlDWLinkedService</code> class from <code>azure.mgmt.datafactory.models</code> with the user-assigned managed identity authentication method.</p>
  <p>My code implementation looks as follows:</p>
  <pre><code>msi_credential = models.ManagedIdentityCredential(resource_id=&quot;/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/my_project/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_user_assigned_managed_identity&quot;)
  
  models.LinkedServiceResource(
              properties=models.AzureSqlDWLinkedService(
                  connection_string=&quot;Server=tcp:synapseworkspace-my-project-ondemand.sql.azuresynapse.net,1433;Database=testDB;Connection Timeout=30&quot;,
                  credential=models.CredentialReference(
                      reference_name=&quot;credential01&quot;,
                      type=&quot;CredentialReference&quot;
                  )
              )
          )
  </code></pre>
  <p>however, the <code>credential01</code> credential I have created manually through UI cannot be found throwing <code>The document creation or update failed because of invalid reference 'credential01'.</code></p>
  <p>How can I create the credential to the user-assigned identity, and link it to <code>AzureSqlDWLinkedService</code> using Azure python SDK? I have tried to do it using <code>ManagedIdentityCredential</code> class and pass it there, but couldn't managed to make it work.</p>
  <p>Appreciate any guidance!</p>