-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
When using the KeyVaultClient like this in my Startup.cs:
public class Startup : IWebJobsStartup
{
public void Configure(IWebJobsBuilder builder)
{
var tempProvider = builder.Services.BuildServiceProvider();
var config = tempProvider.GetRequiredService<IConfiguration>();
builder.AddAzureKeyVault(config["KeyVaultUrl"],
"...",
"...");
}
and then like this in my function:
[FunctionName("RecognizeTextFromImage")]
public static async Task Run(
[EventGridTrigger]
EventGridEvent eventGridEvent,
[Blob("invoice-texts", FileAccess.Read)]
CloudBlobContainer blobDirectory,
[AzureKeyVaultClient]
IKeyVaultClient keyVaultClient,
ILogger log)
{
keyVaultClient.GetSecretAsync("CognitiveServicesEndpoint")
...
}
I would expect that the keyVaultClient instance already uses the KeyVaultUrl as the base URL.
However, this is not the case right now and we need to pass it in:
keyVaultClient.GetSecretAsync(Environment.GetEnvironmentVariable("KeyVaultUrl") ,"CognitiveServicesEndpoint"))
Thanks.
Metadata
Metadata
Assignees
Labels
No labels