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:
Run your Azure Machine Learning pipelines as a step in your Synapse pipelines. To learn more, see Execute Azure Machine Learning pipelines.
Enrich your data with predictions by bringing a machine learning model from the Azure Machine Learning model registry and score the model in Synapse SQL pools. For more details, see Tutorial: Machine learning model scoring wizard for Synapse SQL pools.
- 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.
Open Azure portal.
Go to Azure Active Directory -> App registrations.
Click New registration. Then, follow instructions on the UI to register a new application.
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.
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.
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.
Create a linked service
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".
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.
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.