cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Error when using SAS token to connect to azure Storage Account: Unable to load SAS token provider class: java.lang.IllegalArgumentException

Retko
Contributor

Hi, I am trying to connect to the Storage Account using the SAS token, and receive this error: Unable to load SAS token provider class: java.lang.IllegalArgumentException - more on the picture.

I couldnt find anything on the web for this error.

I also tried making SAS token twice, via portal, also via Program Azure Storage Explorer.

Based on the video - https://www.youtube.com/watch?v=_lkN0lTzl60 - I used correct token.

Token has list rights, together with read. Reading with spark.read.csv() gave same error.

Can you help me out please? Thanksimage.png

1 REPLY 1

Anonymous
Not applicable

@Retko Okter​ :

It seems that there is an issue with the SAS token provider class. This error can occur when the SAS token is not correctly formatted or is invalid.

Here are some steps you can try to resolve the issue:

  1. Verify that the SAS token is correctly formatted and contains the necessary permissions to access the storage account. You can check this by trying to access the storage account using the SAS token from Azure Storage Explorer or Azure Portal.
  2. Make sure that you are using the correct endpoint URL to access the storage account. The endpoint URL can be found in the Azure Portal or by using the az storage account show command in the Azure CLI.
  3. Try to use a different SAS token to see if the issue is with the token itself.
  4. Check if there is any firewall or network configuration that might be blocking the connection to the storage account.
  5. If you are using a custom SAS token provider class, try to verify that the class is correctly implemented and is in the correct package.
  6. Try to update the version of the storage account SDK or Spark connector that you are using.
  7. Check the logs for more information about the error. The logs may provide more details about the issue, including any error messages or stack traces.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.