Not Able to Create a Dataset using azure SDK

Nandalal L J 1 Reputation point
2022-08-04T08:48:28.663+00:00

Hello There,
I am trying to register dataset from a csv file in my blob container storage using Azure ML SDK. However, I keep getting this error message.(Authentication Failed).

Point to note - I used the same Authentication key(from the same object) to upload the csv file in the blob container storage using Azure ML SDK, which was successful.

    DatasetValidationError: DatasetValidationError:  
    	Message: Failed to validate the data.  
    ScriptExecutionException was caused by StreamAccessException.  
      StreamAccessException was caused by AuthenticationException.  
        Authentication failed for 'AzureBlob GetReference' operation at '[REDACTED]' with '403: AuthenticationFailed'. Please make sure the SAS token or the account key is correct.  
          Failed due to inner exception of type: StorageException  
    | session_id=************  
    	InnerException None  
    	ErrorResponse   
    {  
        "error": {  
            "code": "UserError",  
            "message": "Failed to validate the data.\nScriptExecutionException was caused by StreamAccessException.\r\n  StreamAccessException was caused by AuthenticationException.\r\n    Authentication failed for 'AzureBlob GetReference' operation at '[REDACTED]' with '403: AuthenticationFailed'. Please make sure the SAS token or the account key is correct.\r\n      Failed due to inner exception of type: StorageException\r\n| session_id=**********"  
        }  
    }  
Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,508 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,608 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 41,736 Reputation points Microsoft Employee
    2022-08-05T07:25:40.59+00:00

    @Nandalal L J Was there any change or reset of keys with the workspace or your storage account?
    In any case, have you run re-sync keys after this operation?

    If the keys are not reset and still the issue is seen, then it is most likely an issue with the workspace backend unable to update the storage account keys.
    There is an option to update authentication of your storage account on the workspace from azure ml portal. Please try to follow below steps and wait for some time and check if you can proceed with dataset creation.

    1. Navigate to ml.azure.com
    2. Click on datastores from the left-hand menu
    3. Click on the 'workspaceblobstore (Default)' datastore
    4. Check if the keys are incorrect by clicking on 'Browse (preview)' at the top. If you get an error stating the keys are incorrect, use the next steps to fix them
    5. Go back to 'Overview' and click the 'Account name' link to open the storage account
    6. From the storage account window go to 'Access Keys' and click on show button of 'key1' Key and copy the keys
    7. Go back to the ML workspace portal, click 'Update authentication' at the top, and paste in the new 'Account key
    8. Click save, then go back to 'Browse (preview)' to check if you are able to browse your workspace default datastore

    If you are good at step 4 i.e if you are able to browse the default datastore then the issue might be with a different datastore and you could check the other datastores and follow rest of the steps.

    In any case if none of the steps work then you should consider reporting the issue through a support case from Azure portal.
    I hope this helps!! Thanks!!

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    0 comments No comments