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?
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: