microsoft / microsoft/azure-devops-python-api

Is there any workaround for using Entra Tokens?

オープン
#517 コメント 0 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
684
フォーク
218
平均マージ
8日 10時間
マージ済み PR(30日)
1

説明

https://devblogs.microsoft.com/devops/no-new-azure-devops-oauth-apps-beginning-february-2025/
No new Azure DevOps OAuth apps beginning March 2025, so our team is planning to update our code to use Entra application instead.

With the new Entra on-behalf-of token, we can call dev API directly, like https://dev.azure.com/<our_org>/<our_project>/_apis/git/repositories?api-version=7.1-preview.1, but we can not use it with this SDK. The exception is thrown here:
https://github.com/microsoft/azure-devops-python-api/blob/dev/azure-devops/azure/devops/connection.py#L70
resource_areas = self._get_resource_areas()
"TF400813: The user '<user_id>' is not authorized to access this resource."
This code is supposed to fetch ResourceAreaInfo for azure.devops.connection.Connection.

Is there any workaround to use Entra token? Or any plan to update this SDK to be compatible with Entra?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

azure-devops/azure/devops/connection.py の 70 行前後にある _get_resource_areas() の呼び出しから始め、issue に記載されている dev.azure.com API への直接リクエストと、失敗する SDK リクエストを比較します。Entra on-behalf-of トークンが Connection と ResourceAreaInfo の検索にどのように渡されるかを調査します。完了条件は、文書化された回避策、または認証エラー TF400813 が発生しない SDK 互換性の確認です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, python
領域
api, authentication, backend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。