The method for using Service Principal to access ADL2 in Synapse can be summarized in the following steps:
- Create a Service Principal in Azure Active Directory (AAD) and assign it appropriate permissions to access ADL2 storage account.
- Create an Azure Key Vault and store the Service Principal credentials (client ID, client secret) as secrets.
- Create a Synapse workspace or open an existing workspace, and go to the "Linked Services" tab.
- Click on the "New" button and select "Azure Data Lake Storage Gen2" as the linked service type.
- In the "Azure Data Lake Storage Gen2" linked service properties, enter the ADL2 storage account name, and select "Service Principal" as the authentication type.
- Enter the Service Principal's client ID, client secret, and tenant ID, and select the Azure Key Vault that contains the Service Principal credentials.
- Test the connection to verify that the Service Principal can access the ADL2 storage account.
- Use the linked service in Synapse pipelines or notebooks to access and process data stored in ADL2.