How to modify Azure DevOps release definition variable from a release task?

You can use the REST API (Definitions – Update) to update the value of the release definition variable from a release task. Go to the Agent Phase and select Allow Scripts to Access OAuth Token. See Use the OAuth token to access the REST API Grant Project Collection Build Service (xxx) account the edit release … Read more