microsoft / microsoft/azure-devops-python-api
Cannot get accounts list for a multi-organization access token
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 684
- フォーク
- 218
- 平均マージ
- 8日 10時間
- マージ済み PR(30日)
- 1
説明
Hello,
We have the following sample of code we use to list the accounts of a Token "accessible to all organizations". It was working until October 7th. After digging a little deeper into the library, it's trying to get the /_apis/ResourceAreas to presumably get the URLS to the accounts endpoint and calling it directly results in a 500 Internal error after 100 seconds with this payload
{
"$id": "1",
"innerException": null,
"message": "The remote name could not be resolved: 'dpdbotprodwus30.dpdbot.visualstudio.com'",
"typeName": "System.Net.Http.HttpRequestException, System.Net.Http",
"typeKey": "HttpRequestException",
"errorCode": 0,
"eventId": 0
}
Sample code
from azure.devops.connection import Connection
from msrest.authentication import BasicAuthentication
credentials = BasicAuthentication("", token)
connection = Connection(base_url="https://app.vssps.visualstudio.com", creds=credentials)
location_client = connection.clients_v6_0.get_location_client()
accounts_client = connection.clients_v6_0.get_accounts_client()
connection_data = location_client.get_connection_data()
authenticated_user = connection_data.authenticated_user
# This hangs
accounts = list(accounts_client.get_accounts(member_id=authenticated_user.id))
print(accounts)
Is there an issue on the Azure side ? Or perhaps a better way to get the list of accounts for a multi-org personal access token?
Thank you
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず azure.devops.connection.Connection を使ってサンプルを再現し、get_location_client() と get_accounts_client() を取得してから、ResourceAreas リクエストと accounts クライアントのパスを調べます。失敗したレスポンスを、Azure DevOps に文書化されているアカウント一覧取得の動作と比較します。サービス側の障害であるか、複数の組織用トークンに対応したクライアント/API パスを特定できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- azure, python
- 領域
- api
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100