I have some secrets stored in azure keyvault.
Using the following code, I was able to get the secret values via a console application.
using System.Management.Automation; Collection<PSObject> result = PowerShell.Create().AddScript("az keyvault secret show --name 'yyyyy' --vault-name 'zzzz' --query 'value'").Invoke();
when I deploy the same to Sitecore site(by adding to the class library), I see it never gets the result, it's always empty.
Tested this both in the local Sitecore site( by adding clienID, client secret, tenantId) to environment variables and also in the azure app by enabling managed identity.
Any thoughts on what needs to be done to make this work in sitecore site?