Python SDK Returning None for All Non-ID Value Fields
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
提供された memberOf リクエストを Python SDK 1.11.0 で実行し、RequestConfiguration、NativeResponseHandler、および with_url().get の呼び出しを含めて、その JSON を Graph Explorer の結果と比較します。まず、レスポンスハンドラーが ID ではないフィールドをどのようにマッピングしているかを追跡します。displayName やその他の選択した値が None として返されず、保持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
In the Graph Explorer API I can run the following get request:
https://graph.microsoft.com/v1.0/me/memberOf?$search="displayName:{display_name}"&$select=displayName,id
Headers: ConsistencyLevel: eventual, Prefer: legacySearch=false
Below is my version in the Python SDK:
request_config = RequestConfiguration(
options=[ResponseHandlerOption(NativeResponseHandler())]
)
request_config.headers.add("ConsistencyLevel", "eventual")
request_config.headers.add("Prefer", "legacySearch=false")
url = (f'https://graph.microsoft.com/v1.0/me/'
f'memberOf?$search="displayName:{displayName}"&$select=displayName,id')
groups = await (self
.user_client
.me
.with_url(url)
.get(request_config))
groups_data = groups.json()
groups_value = groups_data['value']
return groups_value
Expected behavior
In the Graph API Explorer, I get the following result:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects(displayName,id)",
"value": [
{
"@odata.type": "#microsoft.graph.group",
"displayName": "{display_name}",
"id": "{group_id}"
}
]
}
In the Python application, I get the following result:
[{'@odata.type': '#microsoft.graph.group', 'displayName': None, 'id': '{group_id}'}]
So basically, in the Python code, I am only getting the ID field value. All other field values of interest such as displayName are returned as None.
Is there some way to alter this code to make the non-ID field values displayable?
How to reproduce
Running the example code above should be sufficient to reproduce this scenario.
SDK Version
1.11.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
- 主要言語
- Python
- スター
- 634
- フォーク
- 100
- 平均マージ
- 23時間 18分
- マージ済み PR(30日)
- 7
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-sdk-python のほかの issue
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
microsoftgraph/msgraph-sdk-python#1628 ·
メンテナーはふだん 1 日以内に返信
-
status:waiting-for-triage type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
microsoftgraph/msgraph-sdk-python#1570 ·
メンテナーはふだん 1 日以内に返信
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoftgraph/msgraph-sdk-python#1563 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
kiota-dom-export.txt is large and included in the released package対応中かも @Fryguy が 184 日前に担当しました。 オープンNeeds: Attention :wave: type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
microsoftgraph/msgraph-sdk-python#1287 · コメント 3 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
status:waiting-for-triage type:feature
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
microsoftgraph/msgraph-sdk-python#1596 ·
メンテナーはふだん 1 日以内に返信
microsoftgraph/msgraph-sdk-python の issue をすべて見る
似ている issue
-
tests
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[Plugin] 群聊记忆 · 人格养成オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 74/100
-
bug maintainer-managed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
awslabs/visual-asset-management-system#1759 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100