diff --git a/eng/common/pipelines/templates/steps/retain-run.yml b/eng/common/pipelines/templates/steps/retain-run.yml index 0ba622dcff85..a514b90f2291 100644 --- a/eng/common/pipelines/templates/steps/retain-run.yml +++ b/eng/common/pipelines/templates/steps/retain-run.yml @@ -6,7 +6,8 @@ parameters: steps: - task: PowerShell@2 displayName: Retain pipeline run - condition: ${{ parameters.Condition }} + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) inputs: pwsh: true filePath: $(Build.SourcesDirectory)/eng/common/scripts/Add-RetentionLease.ps1 @@ -17,5 +18,5 @@ steps: -RunId $(Build.BuildId) -OwnerId Pipeline -DaysValid ${{parameters.DaysValid}} - -Base64EncodedAuthToken $(System.AccessToken) + -Base64EncodedAuthToken $env:SYSTEM_ACCESSTOKEN -Debug \ No newline at end of file