microsoft / microsoft/azure-devops-python-api

Is there any workaround for using Entra Tokens?

未關閉
#517 0 則留言 4 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
684
分支
218
平均合併
8 天 10 小時
30 天內合併 PR
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. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 azure-devops/azure/devops/connection.py 中約第 70 行的 _get_resource_areas() 呼叫開始,接著比較失敗的 SDK 要求與 issue 中描述的直接 dev.azure.com API 要求。調查 Entra on-behalf-of 權杖如何傳遞給 Connection 以及 ResourceAreaInfo 查找;完成條件是提供有文件記錄的 workaround,或確認 SDK 相容且不會出現 TF400813 授權錯誤。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
azure, python
領域
api, authentication, backend
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。