title: Use 'Oath Token' in Azure Devops Yaml file not working
body: <p>We are using Azure Devops and want to use the variable &quot;$(Rev:r)&quot; in the update assembly task.
  However we get build errors when using the this variable.</p>
  <p>Yaml task:</p>
  <pre>
    - task: update-assembly-info@2
      displayName: 'Update Assembly ...........'
      inputs:
        assemblyInfoFiles: ...........
        company: '...........'
        product: ...........
        copyright: '© $(Assembly.Company) $(Date:yyyy)'
        fileVersionMajor: '$(Date:yyyy)'
        fileVersionMinor: '$(Date:MM)'
        fileVersionBuild: '$(Date:dd)'
        fileVersionRevision: '$(Rev:r)'
        assemblyVersionMajor: '$(Date:yyyy)'
        assemblyVersionMinor: '$(Date:MM)'
        assemblyVersionBuild: '$(Date:dd)'
        assemblyVersionRevision: '$(Rev:r)'
  </pre>
  <p>However we get the following error:</p>
  <pre>
  ##[error]'Allow Scripts to Access OAuth Token' must be enabled when using the $(Rev:r) variable
  </pre>
  <p>When we do the exact same steps without using a yaml file but in the GUI in Azure Devops, we can enable the &quot;<em>Allow scripts to access the OAuth token</em>&quot; property and is is working as expected.<a href="https://i.stack.imgur.com/SBs7D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SBs7D.png" alt="enter image description here" /></a></p>
  <p>How can we enable this OAuth token in the yaml file? So we can use this &quot;$(Rev:r)&quot; in the update assembly task in the yaml file?</p>
  <hr>