Get Secrets: Failed To Retrieve Secrets. Error: Invalid URI: The Hostname Could Not Be Parsed

How to resolve "Get Secrets: Failed to retrieve secrets. Error: Invalid URI: The hostname could not be parsed." error?

Root Cause: The field “KeyVaultName” is used to construct a url. The URL is .vault.azure.net. If the vault name is not formatted correctly this error will be encountered.


Resolution: Ensure the KeyVaultName property is formatted correctly, by performing the below steps,

  1. Verify the vault name on Azure at Home -> Key Vaults
  1. Verify that the KeyVaultName is properly formatted (the name is case sensitive) so the resulting URL, .vault.azure.net, resolves correctly.