Forum Discussion

rocksde's avatar
rocksde
Copper Contributor
Jun 25, 2020

linked service ADLS Gen2 via Key Vault error The specified account key is invalid.

Hi,

Sorry but I am stuck.

I have a ADLS Gen2 with a storage firewall. I setup a Key Vault that has a secret for the ADLS containing the connection string from key 1. ADF is allowed on the Key Vault via policy. For some reason I get this error: The specified account key is invalid. Check your ADF configuration. The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. 

 

This happens on both keys by the way and even when I regenerate the keys.

I cannot find anything on that anywhere. Any ideas?

Thanks 

2 Replies

  • Madhu_Balan's avatar
    Madhu_Balan
    Copper Contributor

    rocksde If you're trying to authenticate ADLS Gen2, you're supposed to provide only the KEY in the secret (not the full identifier of your storage account). Not sure why microsoft has designed this in such a way. Please test and let me know if it works for you.

  • rohanislam's avatar
    rohanislam
    Brass Contributor
    Looks like your ADF is able to go into the key vault and read the secret value but probably it is not able to identify it as a Base-64 string.

    A Base-64 string contains alpha (upper and lower cases) numeric characters with + and / as allowed symbol. The length must be multiple of 4. Normally upto two = symbols are used as padding at the end of the string to make the length a multiple of 4.

    So, please verify the storage key.
    Check the configuration of the ADF.
    Check how you defined your variable.
    Try putting your storage account connection string within double quotes.

Resources