Revert variable set change

Dear Team,
We’re using a large variable set with some sensitive variable templates. An unfortunate soul managed to change a sensitive variable template controlType into Single-line text, which again seems to have zeroed out all our Tenant values.

I’m guessing the answer is no, but is there an intelligent way to revert this change and get the values back? It will be a major pain in the ass to do it manually.

Hi @lars.lagreid.jensen,

Unfortunately, I don’t have good news for you.

You’re right in your assumption that there’s no simple way to revert the change. The reason for this is that sensitive variables are encrypted one-way, meaning there’s no way to retrieve the old value from something like the REST API, or from the database.

This might be scant consolation, but if you know what the sensitive values were, then you could automate the re-entering of the details using the REST API. I assume the variable templates were “Common Variables” as opposed to Project Variable templates. We have a different example in our GitHub repo for updating project variables here:

This would need some modification if they were common variables as the object returned in the $variables object contains two collections; ProjectVariables and LibraryVariables.

I’m sorry I don’t have better news for you. If you have any questions, just let me know.

Best regards,

1 Like