Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

build.get_artifact_content_zip() returns TF400813 error

Offen
#508 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
azure, python
Bereich
api

Rechercherichtung

Beginnen Sie in azure-devops/azure/devops/v7_1/build/build_client.py und reproduzieren Sie den erfolgreichen get_artifact-Aufruf zusammen mit get_artifact_content_zip mit den angegebenen Projekt-, Build- und Artefaktwerten. Vergleichen Sie, wie die beiden Einstiegspunkte die Autorisierung und den Zugriff auf Artefakte handhaben. Als erledigt gilt die Aufgabe, wenn die Zip-Anfrage mit dem angegebenen Build Read PAT-Scope funktioniert oder die Einschränkung und die erforderliche Berechtigung klar identifiziert sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

I reported this issue with Azure support and they asked me to contact the product team directly.

I'm using a PAT which has the Build Read scope

7.1.0b4 version of the Devops library is installed as a dependency

----------------------------------
Installing dependencies
----------------------------------
Requirement already satisfied: azure-devops in ./venv/lib/python3.12/site-packages (from -r requirements.txt (line 1)) (7.1.0b4)

I will be referring to functions in https://github.com/microsoft/azure-devops-python-api/blob/dev/azure-devops/azure/devops/v7_1/build/build_client.py

I am able to call the following function get_artifact("dev-control-plane-deployments", 689011, artifact_name="output") and get a successful response as follows,

{'additional_properties': {}, 'id': 244186, 'name': 'output', 'resource': <azure.devops.v7_0.build.models.ArtifactResource object at 0x10580e5a0>, 'source': '6f0348f4-34df-5a9a-6f7a-f9fecb8e1bf8'}

However when I try to download the artifact zip using get_artifact_content_zip("dev-control-plane-deployments", 689011, artifact_name="output") I get the following error response

TF400813: The user 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource.

Please help me find a solution so I can use get_artifact_content_zip() to download the artifact zip file

Note that I am able to download the artifact directly from the pipeline run via the web browser, its just the API call that does not seem to work

Vorherrschende Sprache
Python
Sterne
684
Forks
218
Ø Merge
8 T. 10 Std.
Gemergte PRs (30 T.)
1

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/azure-devops-python-api

Alle Issues in microsoft/azure-devops-python-api

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.