microsoftgraph / microsoftgraph/msgraph-beta-sdk-python
authentication_protocol property of sign-ins events is always an empty list
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 44
- フォーク
- 16
- 平均マージ
- 20時間 39分
- マージ済み PR(30日)
- 3
説明
Describe the bug
When accessing a sign-in event, for example via audit_logs.sign_ins.get() the authentication_protocol property is always an empty list ([]).
If you look at the same sign-in event in Entra ID or Graph Explorer, the field authenticationProtocol is properly filled.
Expected behavior
The authentication_protocol property should contain one of the allowed values. See https://learn.microsoft.com/en-us/graph/api/resources/signin?view=graph-rest-beta#properties -> authenticationProtocol
How to reproduce
Run
import asyncio
from azure.identity.aio import ClientSecretCredential
from msgraph_beta import GraphServiceClient
credential = ClientSecretCredential(
'tenant_id',
'client_id',
'client_secret'
)
scopes = ['https://graph.microsoft.com/.default']
graph_client = GraphServiceClient(credential, scopes=scopes)
async def get_signins()-> None:
signins =await graph_client.audit_logs.sign_ins.get()
for signin in signins.value:
print(signin.authentication_protocol)
asyncio.run(get_signins())
and compare it to the authenticationProtocol field in the output of https://graph.microsoft.com/beta/auditLogs/signIns
SDK Version
1.51.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Configuration
- OS: Ubuntu 22.04
- architecture: x86_64
Other information
I suspect the usage of get_collection_of_enum_values() instead of get_enum_value() to be the reason for this:
https://github.com/microsoftgraph/msgraph-beta-sdk-python/blob/a606d0365c39a5c2e5f658841a1a7c58d270438b/msgraph_beta/generated/models/sign_in.py#L295
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue でリンクされている generated models/sign_in.py の場所から始め、特に 295 行目付近の authentication_protocol の処理を確認してください。提供されているサインイン取得の例を実行し、SDK の値と Graph beta のレスポンスを比較してください。authentication_protocol に空のリストではなく、返された許可済みの値が含まれていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 48/100