Datastore access blocked suddenly

Jason Hoffman 11 Reputation points
2022-08-22T14:41:24.833+00:00

I've been using a datastore to store and load data for Azure ML Studio, and it's been working for months, but suddenly I'm getting the error below when I load the data using the Python SDK azureml.core.Dataset API. It seems to be related to the SAS token we're using for authentication, but I can't find the place in our Workspace to verify the Access Token, nor how to generate a new one. Would anyone be willing to point me in the direction of the steps to debug this and understand what I need to do to re-enable access? Thank You

UserErrorException: UserErrorException:
Message: Execution failed in operation 'to_pandas_dataframe' for Dataset(id='6cec98c2-cc4f-470f-bbba-1e206474d0f2', name='Participants_data_1208', version=4, error_code=ScriptExecution.StreamAccess.Authentication,error_message=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=baecfaee-42e1-4256-b8eb-8d2397c14df7) ErrorCode: ScriptExecution.StreamAccess.Authentication
InnerException
Error Code: ScriptExecution.StreamAccess.Authentication
Failed Step: 9f9afcc6-85b1-4849-9002-f57bf78986eb
Error Message: ScriptExecutionException was caused by StreamAccessException.
StreamAccessException was caused by AuthenticationException.
Authentication failed for 'AzureBlob GetReference' operation at 'https://patientdatablob.blob.core.windows.net/patientcontainer/Participants_table_2021-11-15.csv' with '403: AuthenticationFailed'. Please make sure the SAS token or the account key is correct.
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
| session_id=baecfaee-42e1-4256-b8eb-8d2397c14df7
ErrorResponse
{
"error": {
"code": "UserError",
"message": "Execution failed in operation 'to_pandas_dataframe' for Dataset(id='6cec98c2-cc4f-470f-bbba-1e206474d0f2', name='Participants_data_1208', version=4, error_code=ScriptExecution.StreamAccess.Authentication,error_message=ScriptExecutionException was caused by StreamAccessException.\n StreamAccessException was caused by AuthenticationException.\n Authentication failed for 'AzureBlob GetReference' operation at '[REDACTED]' with '403: AuthenticationFailed'. Please make sure the SAS token or the account key is correct.\n Failed due to inner exception of type: StorageException\n| session_id=baecfaee-42e1-4256-b8eb-8d2397c14df7) ErrorCode: ScriptExecution.StreamAccess.Authentication"
}
}

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,969 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jason Hoffman 11 Reputation points
    2022-10-03T19:00:50.957+00:00

    Thank you for checking in. I was able to get some help with this and I wanted to post the steps I was missing here in case anyone else hits this issue.

    I needed to generate a new SAS key for our datastore, and here's how I did it:

    1. How to generate keys
      a. From Azure Portal, search for and click on ‘Storage Account’
      b. Click <your storage account>
      c. Under Data storage, click ‘Containers’
      d. Click <your container>
      e. Under Settings, click ‘Shared access tokens’
      f. Generate the key:
      i. Set up the date of expiry
      ii. Set up Permissions (select all)
      iii. Click ‘Generate SAS token and URL’
      iv. Copy those to save them in a secure location
    2. Copy in the token (not the URL) into the location indicated by the Auth error
      a. Go to ‘Data’ under Assets in the left bar
      b. Under Data Source, click <your datastore>
      c. Click ‘Update authentication’
      d. Copy in the token and click 'Save'

    After these steps, I followed the steps in https://learn.microsoft.com/en-us/azure/machine-learning/how-to-change-storage-access-key to sync the keys for the workspace (substituting n for w, since it appears that argument has changed since that tutorial was posted), and voila! It's working. Unfortunately, there don't seem to be any help forums particularly listing out these steps, so it appears that I was just supposed to know about this, or maybe I missed some tutorial somewhere, but either way, I hope this helps someone!

    2 people found this answer helpful.