title: How to log into Azure DevOps Artifact feed without token
body: <p>I have a Azure DevOps artifact feed that we set up. In the same project as the artifact I have created a gradle build and using a token as the password I can access the artifact feed to have it access artifacts. Someone in my department thinks that there might be a way to access the artifact repo without a token. I tried using System.AccessToken but it did not work. Perhaps there is a different way to set up the artifact?</p>
  
  <p>Here is my gradle.build file:</p>
  
  <pre><code>    credentials { 
          username "Testuser" 
          DevOps Services_ENV_ACCESS_TOKEN") : vstsMavenAccessToken 
          //password "&lt;using raw token works&gt;"
          //password System.getenv("SYSTEM_ACCESSTOKEN")
          password System.getenv("TOKEN")
      } 
  </code></pre>
  
  <p>Here is my azure-pipelines.yml where I define the variables I use in the build.gradle file. token is a environment variable that I have set to the my actual token (which works). If I swap it and use the System.AccessToken it does not work:</p>
  
  <pre><code>steps:
  - task: Gradle@2
    inputs:
      workingDirectory: ''
      gradleWrapperFile: 'gradlew'
      gradleOptions: '-Xmx3072m'
      javaHomeOption: 'JDKVersion'
      jdkVersionOption: '1.11'
      jdkArchitectureOption: 'x64'
      publishJUnitResults: true
      testResultsFiles: '**/TEST-*.xml'
      tasks: 'build'
    env:
      SYSTEM_ACCESSTOKEN: $(System.AccessToken)
      TOKEN: $(token)
  </code></pre>
  
  <p>Stay well and thanks for any help or insight!</p>