Quickstart: Create a new Azure Machine Learning linked service in Synapse

In this quickstart, you'll link an Synapse Analytics workspace to an Azure Machine Learning workspace. Linking these workspaces allows you to leverage Azure Machine Learning from various experiences in Synapse.

For example, this linking to an Azure Machine Learning workspace enables these experiences:


  • Azure subscription - Create one for free.
  • Synapse Analytics workspace with an ADLS Gen2 storage account configured as the default storage. You need to be the Storage Blob Data Contributor of the ADLS Gen2 filesystem that you work with.
  • Azure Machine Learning Workspace.
  • You need permissions (or request from someone who has permissions) to create a service principal and secret which you can use to create the linked service. Note that this service principal needs to be assigned the contributor role in the Azure Machine Learning Workspace.

Sign in to the Azure portal

Sign in to the Azure portal

Create a service principal

This step will create a new Service Principal. If you want to use an existing Service Principal, you can skip this step.

  1. Open Azure portal.

  2. Go to Azure Active Directory -> App registrations.

  3. Click New registration. Then, follow instructions on the UI to register a new application.

  4. After the application is registered. Generate a secret for the application. Go to Your application -> Certificate & Secret. Click Add client secret to generate a secret. Keep the secret safe and it will be used later.

    Generate secret

  5. Create a service principal for the application. Go to Your application -> Overview and then click Create service principal. In some cases, this service principal is automatically created.

    Create service principal

  6. Add the service principal as "contributor" of the Azure Machine Learning workspace. Note that this will require being an owner of the resource group that the Azure Machine Learning workspace belongs to.

    Assign contributor role

Create a linked service

  1. In the Synapse workspace where you want to create the new Azure Machine Learning linked service, go to Management -> Linked service, create a new linked service with type "Azure Machine Learning".

    Create linked service

  2. Fill out the form:

    • Service principal ID: This is the application (client) ID of the Application.


      This is NOT the name of the application. You can find this ID in the overview page of the application. It should be a long string looking similar to this "81707eac-ab38-406u-8f6c-10ce76a568d5".

    • Service principal key: The secret you generated in the previous section.

  3. Click Test Connection to verify if the configuration is correct. If the connection test passes, click Save.

    If the connection test failed, make sure that the service principal ID and secret are correct and try again.

Next steps