Secret Variables blank

I have 2 PSU instances running using gMSA (non local admin)

on both I’m unable to retrieve the content of secret variables

I create a variable in the Admin panel, which adds:

New-PSUVariable -Name "testsecret" -Vault "BuiltInLocalVault" -Type "PSCredential"

To Variables.ps1

but $TestSecret returns ""
and Get-PSUVariable -Name testsecret -Integrated returns

[{"Id":7,"Name":"testsecret","Value":"","UserName":null,"Password":null,"Secret":false,"Vault":"BuiltInLocalVault","Type":"PSCredential","CreatedTime":"0001-01-01T00:00:00","UpdatedTime":"0001-01-01T00:00:00","Description":null,"MissingSecret":false,"DisableRunAsSupport":false,"DeleteSecret":false,"ReadOnly":false,"DisplayValue":""}]

I can retrieve the contents of normal variables just fine.

Edit

Oh well, Editing my service to run as System did not change the behaviour.

same goes when using database

[{“Id”:7,“Name”:“SecretTest2”,“Value”:“”,“UserName”:null,“Password”:null,“Secret”:false,“Vault”:“Database”,“Type”:“PSCredential”,“CreatedTime”:“0001-01-01T00:00:00”,“UpdatedTime”:“0001-01-01T00:00:00”,“Description”:null,“MissingSecret”:false,“DisableRunAsSupport”:false,“DeleteSecret”:false,“ReadOnly”:false,“DisplayValue”:“”}]

Secrets aren’t returned by the API or as regular variables. You need to use the secret scope.

$Secret:testsecret