private async Task SetSecretAsync(string secretName, EndpointDetail endpoint) { if (string.IsNullOrEmpty(secretName)) { secretName = Guid.NewGuid().ToString(); } endpoint.ApplicationSecretId = secretName; await vault.SetSecretAsync( endpoint.ApplicationSecretId, endpoint.ApplicationSecret, "text/plain").ConfigureAwait(false); endpoint.ApplicationSecret = null; }