How to connect synapse external table using ADF.

Harshraj Sawant 0 Reputation points
2025-01-24T11:28:31.66+00:00

I have Azure Synapse external tables and wanted to bring those table data into another adls account using adf.
Created Link service in ADF using authentication type as sql authentication. used admin username and password in the same. Test connection is successful

when doing copy activity using above link service encountered with below error.

Failure happened on 'Source' side. 'Type=Microsoft.Data.SqlClient.SqlException,Message=Cannot find the CREDENTIAL 'https://sapiabbid365sit001.dfs.core.windows.net/dataverse-apps-unq2dfb13cbc5b9ed11a10b000d3ab81/OptionsetMetadata/GlobalOptionsetMetadata.csv', because it does not exist or you do not have permission.,Source=Framework Microsoft SqlClient Data Provider,'

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,149 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,164 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Nandan Hegde 33,561 Reputation points MVP
    2025-01-24T13:51:30.9133333+00:00

    https://stackoverflow.com/questions/71938817/synapses-serverless-pool-read-external-tables

    One needs to give the user storage blob data contributor access on the storage account and you cannot do it via SQL auth.

    So please use diff auth method

    0 comments No comments

  2. Sina Salam 16,446 Reputation points
    2025-01-25T01:42:22.9566667+00:00

    Hello Harshraj Sawant,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you would like to know how you can connect synapse external table using ADF.

    The error occurs because Synapse serverless SQL pools require a credential object in the database to authenticate with ADLS. This credential is missing or misconfigured. Also, SQL authentication does not support ADLS access; you must use AAD authentication (e.g., managed identity or AAD service principal).

    The best way to resolve this is to:

    A. Set Up External Table Credential in Synapse:

    1. Use a Managed Identity or an AAD Service Principal for authentication.
    • An example using a Managed Identity is to assign the Synapse Workspace’s Managed Identity the Storage Blob Data Contributor role on the ADLS account.
    1. Create a database-scoped credential in Synapse to access ADLS:
           CREATE DATABASE SCOPED CREDENTIAL myADLSCredential
            WITH
            IDENTITY = 'Managed Identity';
    
    1. Recreate or alter the external table to use this credential.

    B. Update the ADF Linked Service:

    • Modify the Synapse linked service in ADF to use Managed Identity or AAD Service Principal Authentication.
    • For Managed Identity:
      • In the Synapse linked service in ADF, set the authentication type to "Managed Identity."
      • Ensure the ADF Managed Identity has sufficient permissions (e.g., Storage Blob Data Contributor) on the ADLS account.
    • For Service Principal:
      • Register an application in Azure AD and provide it the Storage Blob Data Contributor role on the ADLS account.
      • Update the linked service in ADF with the service principal's client ID, client secret, and tenant ID.

    C. Validate the Permissions:

    • Ensure that the assigned identity (Synapse Workspace or ADF) has access to the required path in ADLS (e.g., OptionsetMetadata/GlobalOptionsetMetadata.csv). Validate this with Azure Storage Explorer or Azure Portal.

    D. Test the Copy Activity in ADF:

    • Reconfigure the ADF copy activity to pull data from the Synapse external table, ensuring it uses the updated linked service.

    NOTE:

    If the above steps are followed correctly, the external table should authenticate with ADLS using AAD authentication, resolving the error.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.