microsoft / microsoft/azure-devops-go-api

Error when try download artifact

Open
#99 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
223
Forks
92
PR merge metrics
No merged PRs in 30d

Description

Hi folks!

I could not retrieve the zip content file of an pipeline artifact. The method GetArtifactContentZip is returning the error:

TF400813: The user '' is not authorized to access this resource.

Code snippet:
`
connection := azuredevops.NewPatConnection(cfg.Azdevops.OrganizationURL, cfg.Azdevops.AccessToken)
args := build.GetArtifactContentZipArgs{
BuildId: &id,
Project: &cfg.Azdevops.Project,
ArtifactName: &artifactName,
}

artifact, err := buildClient.GetArtifactContentZip(ctx, args)
`

Using the same params I have managed retrieve the artifact information.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the GetArtifactContentZip call and the buildClient artifact methods shown in the report, reproducing the request with the same organization URL, project, artifact name, build ID, and PAT. Compare the failing zip-content request with the successful artifact-information request; done means the reported authorization error is resolved or its cause is documented with a reproducible test.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.