locked
Linked service to Azure ML Service - Error while Test Connection RRS feed

  • Question

  • Hi, 

    I'm trying to establish a linked service between Data Factory and Azure Machine Learning Service and I used all the different connection types and none is working.

    I tried to follow all the documentation available but most of it is related to Azure Machine Learning Studio and not Azure Machine Learning Service.

    Anyway I tried the following options:

    Using Azure Key Vault

    I followed the steps defined in docs.microsoft.com/en-us/azure/data-factory/store-credentials-in-key-vault#prerequisites

    1 - Retrieve data factory managed identity by copying the value of "Managed Identity Object ID" generated along with your factory. - Done
    2 - Grant the managed identity access to your Azure Key Vault. - Done
    3 - Create a linked service pointing to your Azure Key Vault. Refer to Azure Key Vault linked service. - Done and it's working. When I test it says Connection successful.
    4 - Create data store linked service, inside which reference the corresponding secret stored in key vault. - This is where it fails, I don't need a Sql Database connection but I need a Azure Machine Learning Service one, when I do these steps I get the following error:

    Connection failed: Failed to get access token by using service principal. Error: invalid_client, Error Message: AADSTS7000215: Invalid client secret is provided.

    To get the Service Principal ID required I ran in Powershell the following:

    > Get-AzureRmAdServicePrincipal -SearchString <my_Azure_ML_workspace_name>

    and the Service Principal Id is the ApplicationId that is retrieved from that command

    Using Service Principal Key

    For this I only need to provide the Service Principal ID and the Key

    To get the Service Principal ID required I ran in Powershell the following:

    > Connect-AzureAD -Confirm

    > Get-AzureRmAdServicePrincipal -SearchString <my_Azure_ML_workspace_name>

    ---- From here I get the ApplicationID value to fill my Service Principal ID 

    > Get-AzureADServicePrincipalKeyCredential -ObjectId <the_id_value_retrieved_from_the_last_command>

    ---- From here I use the KeyId value retrieved to fill the Service Principal Key

    When I test the connection I get the same error:

    Connection failed: Failed to get access token by using service principal. Error: invalid_client, Error Message: AADSTS7000215: Invalid client secret is provided.

    Using specify dynamic contents in JSON format

    Following this documentation: docs.microsoft.com/en-us/azure/data-factory/compute-linked-services#azure-machine-learning-linked-service

    If I select this option and add the following:

    { "name": "AzureMLServiceLinkedService", "properties": { "type": "AzureMLService", "typeProperties": { "subscriptionId": "subscriptionId", "resourceGroupName": "resourceGroupName", "mlWorkspaceName": "mlWorkspaceName", "servicePrincipalId": "service principal id", "servicePrincipalKey": { "value": "service principal key", "type": "SecureString" }, "tenant": "tenant ID" } } }

    I get the same error:

    Connection failed: Failed to get access token by using service principal. Error: invalid_client, Error Message: AADSTS7000215: Invalid client secret is provided.

    Can someone help me with this? What am I doing wrong? What is missing on my configuration?

    Thank you,

    Carla

    Friday, March 13, 2020 3:55 PM

Answers

  • Hi, I was able to fix the issue by creating a new service principal ID.

    Thank you,

    Carla

    Monday, April 27, 2020 9:53 PM

All replies

  • Hello Carla and thank you for your query.

    I understand you are having difficulty connecting to Azure Machine Learning Service.  Could you please tell me what task you are trying to accomplish.  Also, which Data Factory activity are you using?

    Tuesday, March 17, 2020 1:27 AM
  • We have not received a response from you.  Are you still facing the issue?  If you found a solution, would you please share it here with the community?  Otherwise, let us know and we will continue to engage with you on the issue.
    Friday, March 20, 2020 9:56 PM
  • Since we have still not heard back from you, we will assume you found your own resolution.  If you found a solution, would you please share it here with the community?

    Monday, March 23, 2020 10:25 PM
  • Hi,

    Since I was in a dead end I just gave up on doing this development.

    But basically what I was trying to accomplish was to invoke from Azure Data Factory the machine learning webservice that I created by deploying my model there.

    Thank you,

    Carla

    Friday, April 17, 2020 9:05 AM
  • Thank you for letting us know.
    Monday, April 20, 2020 8:13 PM
  • Hi,

    Are you still able to help me on this?

    The issue is still there even thought I've moved away from ADF for a while.

    thank you

    Friday, April 24, 2020 9:01 AM
  • Hi,

    I'm trying to run a ML Execute Pipeline. So I have the pipeline on my Azure ML Service and I want to run it using ADF but every time I try to create the LinkedService I get the errors above.

    Thank you in advance,

    Carla

    Monday, April 27, 2020 1:50 PM
  • Hi, I was able to fix the issue by creating a new service principal ID.

    Thank you,

    Carla

    Monday, April 27, 2020 9:53 PM