Skip to content
← Back to activity

Public problem

AzureFileCopy@6: Auto-login with PowerShell context fails

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

AzureFileCopy@6 fails with: Failed to perform Auto-login: json: cannot unmarshal object into Go struct field .Token of type string. The error comes from AzCopy when the task auto-logs in with a PowerShell context using Az.Accounts 5+ (or latest Az modules 14.x), which changed the token JSON shape that AzCopy parses.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The task team shipped a fix for this in the AzureFileCopy task itself (deployed to all rings): make sure you are on a task version newer than the one referenced in the fix PR. If you cannot pick up the new task version, pin the Az.Accounts PowerShell module to a pre-5.x version on the agent as a workaround.

Source: https://github.com/microsoft/azure-pipelines-tasks/issues/21053

Source: https://github.com/microsoft/azure-pipelines-tasks/issues/21053