gpt4 book ai didi

python - Office365管理事件API没有内容可供下载

转载 作者:行者123 更新时间:2023-12-03 04:26:49 24 4
gpt4 key购买 nike

我只是想创建一个测试应用程序,它可以使用 python Management Activity api 下载 AD 日志(专门查找登录/注销)。我希望为此使用客户端凭据流程并已上传相同的证书。身份验证成功,我获得了 JWT token 。

我能够订阅 Azure 广告内容。

GET /api/v1.0/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/activity/feed/subscriptions/list HTTP/1.1
[{u'status': u'enabled', u'webhook': None, u'contentType': u'Audit.Exchange'}, {u'status': u'enabled', u'webhook': None, u'contentType': u'Audit.AzureActiveDirectory'}]

但是没有内容可供我下载。

GET /api/v1.0/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/activity/feed/subscriptions/content?contentType=Audit.AzureActiveDirectory HTTP/1.1

这会产生一个空响应,200 ok。

我想知道我最后缺少什么才能下载日志。有人遇到过类似的问题吗?

最佳答案

听起来您想下载Azure AD的一些审核日志作为官方文档Azure Active Directory audit report events说的是AAD审计报告事件。

所以你需要按照官方教程 Getting started with the Azure Active Directory reporting API获取这些审计报告事件。但根据audit api reference ,API Endpoint 应该如下所示,而不是您当前使用的。

https://graph.windows.net/contoso.com/activities/audit?api-version=beta

作为the get started tutorial中的引用,虽然几乎都是用PowerShell编写的示例代码,但是有a python sample code你可以引用一下,然后按照这个方法轻松地用Python重写其他的。

希望有帮助。如有任何疑问,请随时告诉我。

关于python - Office365管理事件API没有内容可供下载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42198741/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com