Python SDK Returning None for All Non-ID Value Fields
まだ誰も着手していません。
評価
調査の方向性
提供された 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
- スター
- 630
- フォーク
- 96
- 平均マージ
- 15時間 20分
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-sdk-python のほかの issue
-
status:waiting-for-triage type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
microsoftgraph/msgraph-sdk-python#1570 ·
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoftgraph/msgraph-sdk-python#1563 ·
-
Needs: Attention :wave: type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
microsoftgraph/msgraph-sdk-python#1287 · コメント 2 件 · リアクション 1 件 ·
-
status:waiting-for-triage
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
microsoftgraph/msgraph-sdk-python#1557 ·
-
status:waiting-for-triage type:bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
microsoftgraph/msgraph-sdk-python#1556 · コメント 1 件 · リアクション 1 件 ·
microsoftgraph/msgraph-sdk-python の issue をすべて見る
似ている issue
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100