Azure data servicesIntermediate21 min read

What Does Linked service Mean?

Reviewed byJohnson Ajibi· Senior Network & Security Engineer · MSc IT Security
On This Page

Quick Definition

A linked service is like a saved set of connection instructions. It stores the address, login details, and security settings needed to reach a data store or compute service. You use linked services to connect Azure Data Factory or Synapse to databases, file storage, or other systems.

Commonly Confused With

Linked servicevsDataset

A dataset defines the specific structure or location of data within a data store, like a table name, file path, or schema. A linked service provides the connection to the data store itself. For example, a linked service connects to an Azure SQL server, while a dataset points to a specific table in that server.

Linked service = the address of the warehouse. Dataset = the aisle number and shelf where the product is located.

Linked servicevsIntegration Runtime

An integration runtime is the compute infrastructure that Data Factory uses to perform data movement, activity dispatch, and SSIS execution. A linked service can reference an integration runtime to specify how to connect (e.g., via a self-hosted IR for on-premises). They work together but are separate concepts.

Linked service = the phone number of the person you want to call. Integration runtime = the cell tower and network that actually makes the call possible.

Linked servicevsPipeline Activity

A pipeline activity is a step in a pipeline that performs an action, such as copying data or running a stored procedure. An activity uses linked services to connect to sources and sinks. Linked services are configurations, not actions.

Linked service = the car keys. Activity = the actual driving action to go to the store.

Must Know for Exams

For IT certification exams, understanding linked services is crucial, especially for exams like Microsoft Azure Data Fundamentals (DP-900), Azure Data Engineer Associate (DP-203), and Azure Developer Associate (AZ-204). In these exams, you will encounter questions that test your ability to distinguish between linked services, datasets, and integration runtimes. The exam objectives often include configuring and managing data integration solutions, which directly involve linked services. For example, in DP-203, one of the key skills is to design and implement data movement and transformation pipelines, and linked services are a core component of that.

In exam questions, you might be asked to choose the correct way to store connection credentials for an Azure SQL database in a Data Factory pipeline. The correct answer will involve creating a linked service that references Azure Key Vault. Another common question type presents a scenario where a pipeline fails because of an authentication error, and you need to identify that the linked service has incorrect credentials or that the self-hosted integration runtime is not running. You may also see drag-and-drop or multiple-choice questions where you must order the steps to create a pipeline: first create a linked service, then a dataset, then an activity.

For the Azure Data Fundamentals exam (DP-900), you need to know what a linked service is at a high level, that it defines connection information for a data store. For the more advanced DP-203, you must understand parameterization, linked service types, and how to use integration runtimes with linked services. Questions may ask which authentication method is recommended for Azure resources (managed identity) or how to handle on-premises connections (self-hosted integration runtime). There might be scenario questions where you need to choose between a linked service and a dataset when connecting to a specific table. Understanding the difference is key: linked service connects to the store, dataset points to the specific data object.

Some exams also test your knowledge of linked service JSON structure or how to deploy linked services using ARM templates or PowerShell. Even if you are not writing code, you should be able to read a linked service definition and identify the connection type or the authentication method. Knowing these details will help you answer simulation-style questions and case studies. Linked services are a recurring topic in Azure data and developer exams, and mastering them will give you a solid advantage.

Simple Meaning

Think of a linked service as a stored contact card for a data source. When you want to call someone, you need their phone number and maybe a password to reach them. A linked service holds exactly that kind of information but for a database, a storage account, or a web service. Instead of typing the connection details every time you move data, you create one linked service and reuse it. This makes your work cleaner, safer, and easier to update. For example, if your database server changes its address, you only update the linked service once. Every data movement job that uses that linked service automatically gets the new address. This avoids the nightmare of hunting down every script and changing the address by hand. Linked services also keep passwords and keys secure. You can store secrets in Azure Key Vault, and the linked service will reference them without exposing them in code. In essence, a linked service is a reusable, secure, and centralized way to tell Azure Data Factory or Synapse how to talk to the outside world.

Linked services are not the same as datasets. A dataset points to a specific piece of data inside a data store, like a table or a folder. The linked service provides the connection to the store itself. So you might have one linked service for your Azure SQL database and then several datasets that point to different tables inside that database. This separation keeps things modular. If the database moves to a different server, you update only the linked service. All datasets and activities that depend on it continue to work. This design is a core part of how Azure Data Factory and Synapse pipelines remain manageable and secure in real enterprise environments.

Full Technical Definition

A linked service in Azure Data Factory and Azure Synapse Analytics is a resource that defines the connection information required to access external data sources or compute environments. It is essentially a connection string or a set of properties that include the type of the data store, authentication method, endpoint URL, credentials, and any additional parameters needed to establish a connection. Linked services support a wide range of connectors, including Azure Blob Storage, Azure SQL Database, SQL Server on-premises, Amazon S3, Google BigQuery, REST APIs, and many more. Each connector type has its own schema of required and optional properties.

Under the hood, when a pipeline activity uses a linked service, Azure Data Factory or Synapse resolves the linked service definition at runtime. It retrieves connection details, authenticates using the specified method (such as account key, service principal, managed identity, or SQL authentication), and opens a connection to the target. The linked service definition is stored as JSON within the Data Factory or Synapse workspace. It can be created via the Azure portal, PowerShell, CLI, or ARM templates. Linked services can also reference secrets stored in Azure Key Vault, which means the actual passwords or keys are never exposed in the linked service JSON itself. Instead, a reference to the Key Vault secret is stored, and the service retrieves the secret at runtime using the Data Factory’s or Synapse’s managed identity or a service principal.

In terms of security and compliance, linked services support multiple authentication mechanisms: managed identity (recommended for Azure resources), service principal, system-assigned managed identity, user-assigned managed identity, and key-based authentication. For on-premises sources, linked services rely on Integration Runtimes, either self-hosted or managed virtual network. The self-hosted integration runtime is installed on a local machine or VM and establishes a secure outbound connection to Azure. The linked service points to the integration runtime, which then connects to the on-premises data source. This architecture keeps the on-premises network secure because no inbound ports need to be opened.

Linked services are also used in data flows, where they define the connection for source and sink transformations. In mapping data flows, the linked service provides the connection to the data lake or database, and the data flow reads the schema and data through that connection. Monitoring and troubleshooting of linked services are done via the Azure portal, where you can test the connection and view error messages if the connection fails. Understanding linked services is essential for anyone working with Azure Data Factory or Azure Synapse pipelines, as they are the foundation for all data movement and transformation activities.

Real-Life Example

Imagine you are a delivery driver for a company that picks up packages from multiple warehouses and delivers them to customers. Every time you get a delivery assignment, you need the warehouse address, the contact person’s phone number, and a gate code to enter. If you had to look up that information on a piece of paper every single time, it would be slow and error-prone. Now suppose your company gives you a digital contact card for each warehouse. That card has the address, the phone number, and the gate code. Whenever you need to go to that warehouse, you pull up the contact card on your phone. If the warehouse moves to a new location, the dispatcher updates the contact card once, and all drivers automatically get the new address. That contact card is exactly like a linked service.

In this analogy, the delivery truck and your driving route are the pipeline activities. The contact card (linked service) tells you how to reach the warehouse (data source). The actual packages you pick up are the datasets. You use the same contact card every time you visit that warehouse, even if you are picking up different types of packages. This saves time and reduces mistakes. If the gate code changes, you do not need to call every driver, you just update the contact card. In the world of Azure Data Factory, the linked service works the same way. It stores the connection details for a data store, and every activity that needs to read or write to that store uses the linked service. If the database server changes, you update the linked service once. All pipelines that use it automatically get the new information. This keeps data integration reliable and manageable, just like well-organized contact cards keep a delivery company running smoothly.

Why This Term Matters

Linked services matter because they are the backbone of data integration in Azure Data Factory and Azure Synapse. Without them, you would have to embed connection strings, passwords, and endpoints directly into every pipeline activity. That approach is insecure, hard to maintain, and prone to errors. When a database password rotates, you would need to update every single activity that uses that connection. With linked services, you change one definition, and everything updates automatically. This saves time and reduces the risk of service outages due to stale credentials.

From a security standpoint, linked services support Azure Key Vault integration, which means sensitive information like account keys or SQL passwords are never stored in the pipeline code. Instead, they are pulled from Key Vault at runtime using managed identities. This follows the principle of least privilege and helps organizations meet compliance requirements. Linked services also centralize connection management, making it easier for DevOps teams to audit and control access to data stores. When a new developer joins the team, they do not need to know every database server address, they just need permission to create or modify linked services.

In practical IT operations, linked services allow for environment-specific configurations. You can parameterize linked service properties, such as server name or database name, so that the same pipeline works in development, testing, and production environments just by changing the parameter values. This is critical for CI/CD pipelines. Without linked services, you would need to maintain separate pipeline definitions for each environment. Linked services also enable the use of integration runtimes for hybrid scenarios, connecting on-premises data sources securely. Linked services are not just a convenience, they are a fundamental design element that makes Azure data integration secure, manageable, and scalable.

How It Appears in Exam Questions

Linked service questions appear in several common patterns. The first is the scenario-based question where you are given a business requirement and must choose the best way to connect to a data source. For example: 'A company has an on-premises SQL Server database. They want to move data to Azure Blob Storage using Azure Data Factory. How should they configure the connection to the on-premises database?' The correct answer will involve creating a linked service that uses a self-hosted integration runtime. Distractors might include using a public endpoint or a managed virtual network integration runtime without proper setup.

Another pattern involves authentication choices. A typical question: 'You are creating a linked service for an Azure Storage account. You want to avoid storing keys in the linked service definition. Which authentication method should you use?' Options might include account key, SAS URI, service principal, and managed identity. The correct answer is managed identity because it is secure and does not require storing secrets. You might also see questions about Azure Key Vault integration: 'You need to store the password for your Azure SQL Database linked service securely. What should you do?' The answer is to reference a secret stored in Azure Key Vault from the linked service.

Configuration troubleshooting questions also feature linked services. For instance: 'A Data Factory pipeline fails with a connection timeout error. The linked service for the source SQL database has been tested successfully. What could be the issue?' Possible answers include a firewall blocking the IP, the self-hosted integration runtime being offline, or the dataset schema mismatch. You need to identify that the linked service test succeeded, so the issue is likely at the dataset or activity level, or the network path changed after the test.

Parameterization questions are common in DP-203. For example: 'You have a linked service that connects to an Azure SQL Database. You want to use the same pipeline for development and production databases. How should you configure the linked service?' The correct approach is to parameterize the server name and database name in the linked service definition, then pass different values based on the environment. Answers like creating two separate pipelines or hardcoding the values are wrong.

Finally, you might see comparison questions: 'What is the difference between a linked service and a dataset?' The correct answer is that a linked service defines the connection to a data store, while a dataset defines the specific structure of the data within that store. Knowing these distinctions and common patterns will help you navigate exam questions confidently.

Practise Linked service Questions

Test your understanding with exam-style practice questions.

Practise

Example Scenario

You work as a data engineer for a retail company. The company stores sales data in an Azure SQL Database called 'SalesDB' on a server named 'retail-server.database.windows.net'. You need to create an Azure Data Factory pipeline that copies the 'Orders' table from that database to Azure Blob Storage. You start by creating a linked service for the Azure SQL Database. You name it 'SalesDBLinkedService'. In the linked service configuration, you enter the server name, database name, and choose to use SQL authentication. You store the password in Azure Key Vault and reference that secret in the linked service. Once the linked service is created, you test the connection, and it succeeds.

Next, you create a dataset for the source data. You name it 'OrdersDataset'. This dataset uses the 'SalesDBLinkedService' and points to the 'Orders' table inside the database. You also create a dataset for the sink, a CSV file in Azure Blob Storage. You create a second linked service for the Blob Storage account, using managed identity for authentication. Then you build a pipeline with a copy activity. The source is the 'OrdersDataset', and the sink is the Blob dataset. You run the pipeline, and it successfully copies 10,000 rows from the SQL database to the blob container.

A few months later, the IT team migrates the SQL database to a new server named 'new-retail-server.database.windows.net'. Instead of editing every activity or dataset, you simply open the 'SalesDBLinkedService' and change the server name from 'retail-server' to 'new-retail-server'. You save the change. The next time the pipeline runs, it automatically connects to the new server. You do not need to touch the datasets or the pipeline definition. This scenario shows how linked services simplify maintenance and make pipelines resilient to infrastructure changes.

Common Mistakes

Confusing linked services with datasets

Linked services define how to connect to the data store, while datasets define which specific data (like a table or file) to use within that store. Mixing them leads to incorrect configurations.

Remember: linked service = connection details; dataset = data pointer within that connection.

Storing plain text credentials in linked service definitions

This exposes sensitive information in the pipeline code, posing a security risk and violating compliance policies. Credentials should never be stored in plain text.

Always use Azure Key Vault to store secrets and reference them in the linked service.

Forgetting to test the linked service connection after creation

A linked service might have typos in server names, incorrect ports, or authentication failures. Without testing, you may only discover the issue when the pipeline runs, causing delays.

Always click 'Test connection' in the portal after creating or modifying a linked service.

Not parameterizing linked services for multi-environment deployments

Hardcoding server names or database names makes it impossible to reuse the same pipeline in dev, test, and prod without manual changes. This breaks CI/CD practices.

Use parameters for frequently changing properties like server name, database name, or folder path.

Using the wrong integration runtime for on-premises sources

On-premises data sources require a self-hosted integration runtime. Using the default AutoResolveIntegrationRuntime will fail because it cannot reach private networks.

Install and configure a self-hosted integration runtime, then assign it to the linked service for on-premises sources.

Exam Trap — Don't Get Fooled

{"trap":"The question says the linked service test connection succeeds, but the pipeline fails when running. The distractor suggests the linked service is broken.","why_learners_choose_it":"Learners often assume that if the pipeline fails, it must be a connection issue, so they blame the linked service."

,"how_to_avoid_it":"A successful test connection only confirms that the linked service can reach the data store at that moment. The pipeline failure could be due to firewall rules that change, a dataset pointing to a non-existent table, or insufficient permissions for the activity. Always check the full error message and review the dataset and activity configuration before assuming the linked service is at fault."

Step-by-Step Breakdown

1

Identify the data store

Determine which external system you need to connect to, such as Azure Blob Storage, SQL Server, or a REST API. This decides the connector type and the properties required.

2

Choose authentication method

Select how to authenticate: managed identity (recommended for Azure resources), service principal, account key, SQL authentication, or others. Security and environment constraints guide this choice.

3

Configure connection properties

Fill in the required fields like server name, database name, endpoint URL, or container name. For security, use parameters for values that change across environments.

4

Set up secrets in Azure Key Vault (if needed)

If using authentication methods that require passwords or keys, store those secrets in Key Vault and reference them in the linked service. This keeps sensitive data out of the pipeline code.

5

Assign integration runtime

Choose the integration runtime that will execute the connection. Use AutoResolveIntegrationRuntime for cloud sources, or a self-hosted IR for on-premises or network-restricted sources.

6

Test the connection

Click 'Test connection' to validate that all details are correct and the target is reachable. This catches errors early before pipeline execution.

7

Save and publish

After successful testing, save the linked service. Then publish the changes to make them available to pipeline runs. Without publishing, the definition remains in draft mode.

Practical Mini-Lesson

Linked services are a core concept in Azure Data Factory and Azure Synapse, and mastering them is essential for any data engineer working with these tools. In practice, professionals spend a lot of time setting up linked services correctly because they are the foundation of all data movement. The first thing to understand is that each linked service is tied to a specific connector type. There are over 100 connectors, ranging from common ones like Azure Blob Storage and Azure SQL Database to niche ones like SAP HANA or MongoDB. When you create a linked service, you must select the correct connector type, as the property schema differs for each. For example, an Azure Blob Storage linked service requires a storage account name and an authentication method, while an Azure SQL Database linked service requires server name, database name, and authentication details.

One of the most important professional practices is to use parameters in linked services. Instead of hardcoding the server name, you can define a parameter called 'ServerName' and assign a default value. Then, when you deploy the pipeline to a different environment, you can override the parameter. This is critical for DevOps and CI/CD pipelines. Without parameterization, you would need to maintain separate linked services for dev, test, and prod, which increases complexity and the chance of misconfiguration. Another best practice is to use managed identity for authentication whenever possible, especially when connecting to Azure resources. Managed identity eliminates the need to manage credentials and reduces security risks. For non-Azure resources, you can use service principals or store secrets in Key Vault.

What can go wrong? The most common issues are typos in server names, expired passwords, and firewall rules that block the Data Factory’s IP address. When a pipeline fails with a connection error, the first step is to check the linked service’s test connection. If the test connection fails, review the error message, it often points to the specific problem, such as 'Cannot connect to server' or 'Login failed for user'. If the test connection succeeds but the pipeline fails, the issue might be at the dataset or activity level, such as the table name being incorrect or the sink location not existing. Another common problem is that the self-hosted integration runtime becomes unavailable due to network issues or machine restarts. Always monitor the integration runtime status in the Azure portal.

Professionals also need to understand how linked services interact with data flows. In mapping data flows, linked services are used for source and sink connections, but the data flow also reads schema definitions. If the linked service connection changes, data flows might break if they rely on specific schema structures. Therefore, it is important to test data flows after any linked service modification. Linked services are not 'set and forget' resources, they require careful planning, parameterization, and ongoing monitoring to ensure reliable data integration.

Memory Tip

Think of a linked service as the 'contact card' for your data store, it has the number, address, and security code needed to reach it.

Covered in These Exams

Current Exam Context

Current exam versions that test this topic — use these objectives when studying.

Related Glossary Terms

Frequently Asked Questions

Can I use a linked service without creating a dataset?

Yes, you can use a linked service directly in some activities, like Copy Data, by specifying the source and sink inline. However, using datasets is recommended for reusability and clarity.

Can I update a linked service while a pipeline is running?

Yes, you can update a linked service at any time. The change will take effect the next time the pipeline runs. Active pipeline runs continue to use the previous definition.

What happens if I delete a linked service that is used by a dataset?

The dataset will become orphaned and any pipeline activity that references that dataset will fail. You must create a new linked service and update the dataset to use it.

Can I share linked services between multiple Azure Data Factories?

Linked services are scoped to a single Data Factory or Synapse workspace. To share, you can export the linked service as an ARM template and import it into another factory.

What is the difference between a linked service and a connection in Power BI?

A linked service is specific to Azure Data Factory and Synapse. Power BI uses data source settings and gateway connections, which serve a similar purpose but are configured differently.

Do linked services support connection pooling?

No, linked services do not manage connection pooling. Connection pooling is handled by the underlying data store driver or the integration runtime.

Summary

Linked services are a core building block in Azure Data Factory and Azure Synapse Analytics. They act as a centralized connection definition that tells these services how to reach external data stores or compute resources. By storing connection details, authentication methods, and security references in one place, linked services make data pipelines more secure, maintainable, and reusable. They separate the 'how to connect' from the 'what data to use', allowing datasets and activities to remain flexible when infrastructure changes.

For IT certification candidates, particularly those studying for Azure data and developer exams, understanding linked services is essential. You will encounter questions that test your ability to choose the right authentication method, troubleshoot connection failures, and distinguish linked services from datasets and integration runtimes. The exam traps often involve confusing these related concepts or misidentifying the cause of a pipeline failure. By mastering the practical use of linked services, including parameterization, Key Vault integration, and integration runtime selection, you will be well-prepared for both the exam and real-world data engineering work.

a linked service is your secure, reusable contact card for data sources. Use it wisely, and your pipelines will be robust, adaptable, and secure.