英文:
How do i get the the user that created an user in graph
问题
我已经阅读了关于Microsoft Graph中的用户属性的文档,但我找不到“由用户创建”属性。
我找到了“创建日期”属性,但是Azure是否会记录谁创建了一个用户呢?
英文:
I have been reading the documentation on Microsoft Graph on user properties and i can not find the "Created by user" property.
I have found the "Date of creation" property but does azure even register who created an user?
答案1
得分: 0
我创建了一个用户,该活动将显示在审核日志中,如下所示:
要获取创建用户的用户,您可以使用以下查询来筛选审核日志:
GET https://graph.microsoft.com//v1.0/auditLogs/directoryAudits?&$filter=activityDisplayName eq 'Add user'
inititatedBy
是创建用户的用户,位于 targetResources
中。
确保同意**AuditLog.Read.All
** 权限以执行此操作。
参考链接:
Audit logs in Azure Active Directory - Microsoft Entra
英文:
I created a user, and the activity will show up in the Audit logs like below:
To fetch the user that created a user, you can make use of below query to filter Audit Logs:
GET https://graph.microsoft.com//v1.0/auditLogs/directoryAudits?&$filter=activityDisplayName eq 'Add user'
The inititatedBy
is the user who created the user present in the targetResources
.
Make sure to consent AuditLog.Read.All
permission to perform the action.
Reference:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论