Product: PowerShell Universal Version: 5.0.12
Testing secret variables in API and got stuck…
As pictures shown, $Secret:HelloSecret
I can’t get any value in API

4a01451e08b4402f62776bda4564f313fed41dce.png
36a1dea253af8428a9fe8fdc036d1440fb6cc6d9.png
$Secret: variables will not be shown in output, that would be a security issue
I see
it works as run as cred with script
but if I try to use it in API with Invoke-Restmetod ********* -Credential $Secret:mysecret
It seems not working, is it by design or is it only works in scripts?