authentication_protocol property of sign-ins events is always an empty list
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
從 issue 中連結的 generated models/sign_in.py 位置開始,特別檢查第 295 行附近對 authentication_protocol 的處理。執行提供的登入資訊擷取範例,並將 SDK 值與 Graph beta 回應進行比較;當 authentication_protocol 包含回傳的允許值而不是空清單時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- Python
- 星號
- 44
- 分支
- 16
- 平均合併
- 20 小時 39 分鐘
- 30 天內合併 PR
- 3
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoftgraph/msgraph-beta-sdk-python 的其他 Issue
-
enhancement
難度 1/5 1 小時以內 新手友好度 72/100
microsoftgraph/msgraph-beta-sdk-python#376 ·
維護者通常 1 天內回覆
-
status:waiting-for-triage type:bug
難度 3/5 1-2 天 新手友好度 55/100
microsoftgraph/msgraph-beta-sdk-python#1038 ·
維護者通常 1 天內回覆
-
type:bug type:investigation
難度 3/5 1-2 天 新手友好度 48/100
microsoftgraph/msgraph-beta-sdk-python#1033 · 1 個 reaction ·
維護者通常 1 天內回覆
-
status:waiting-for-triage type:bug
難度 3/5 1-2 天 新手友好度 42/100
microsoftgraph/msgraph-beta-sdk-python#1006 · 1 則留言 ·
維護者通常 1 天內回覆
-
status:waiting-for-triage type:bug
難度 4/5 3-5 天 新手友好度 45/100
microsoftgraph/msgraph-beta-sdk-python#959 ·
維護者通常 1 天內回覆
查看 microsoftgraph/msgraph-beta-sdk-python 的全部 Issue
相似的 Issue
-
comp/tools duplicate P2 sweeper:risk-compatibility tool/mcp type/bug
難度 1/5 1 小時以內 新手友好度 88/100
NousResearch/hermes-agent#132042 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
deepset-ai/haystack#13092 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 86/100
EverMind-AI/Raven#845 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
AstrBotDevs/AstrBot#10340 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
BasedHardware/omi#20401 · 1 則留言 ·
維護者通常 1 天內回覆