0

I'm using python scripts to create and manage data factory pipelines, when I want to create a linked service, I'm just using this code:

https://learn.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-python#create-a-linked-service

but now I want to create the linked service using managed identity and not by name and key, and I can't find any example of how to do it with python.

I managed to do it manually like so: enter image description here

but I want to do it using python.

thanks!

1 Answer 1

2

service_endpoint str Required Blob service endpoint of the Azure Blob Storage resource. It is mutually exclusive with connectionString, sasUri property.

According to the API documentation, you should use service_endpoint to create linked service with Managed identity. You should pass Blob service endpoint to service_endpoint.

The following is my test code:

ls_name = 'storageLinkedService001'
endpoint_string = 'https://<account name>.blob.core.windows.net'
ls_azure_storage = LinkedServiceResource(properties=AzureBlobStorageLinkedService(service_endpoint=endpoint_string))
ls = adf_client.linked_services.create_or_update(rg_name, df_name, ls_name, ls_azure_storage)

Result:

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

you are my hero :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.