我使用下面的代码来获取keyvault值,但在运行代码时,我得到了错误raise binaslog.Error(“Connection string secret has incorrect padding”)binaslog.Error:Connection string secret has incorrect padding
from azure.appconfiguration import AzureAppConfigurationClient
from azure.identity import DefaultAzureCredential. I have updated the latest package as well.
from azure.keyvault.secrets import SecretClient
app_string_url = "Endpoint=https://xxx.azconfig.io;Id=123;Secret=123" # not used
secret_name = 'ACS_ENDPOINT'
# Create an instance of AzureAppConfigurationClient
credential=DefaultAzureCredential()
app_config_client = AzureAppConfigurationClient.from_connection_string(connection_string=app_string_url)
config_setting = app_config_client.get_configuration_setting(secret_name)
# error at last line
字符串
1条答案
按热度按时间xxb16uws1#
你可以使用下面的代码来做同样的事情,并遵循Microsoft-Document:
字符串
或者,您可以按照此SO-Thread获取秘密。