I am currently learning KQL and have only a beginner level of knowledge with SQL.
I have a table called Dynamics365Activities which has the following columns:
- UserID (username of the person performing an action)
- SystemUserID (Object ID of the username performing an action)
- Operation (Type of operation performed by the user)
- EntityID (SystemUserID [or object id] of the person on which the operation was performed)
I would like to get a username of the person on which the operation was performed, rather than the object ID. Below is the KQL I have constructed:
Dynamics365Activity
| project TimeGenerated, UserId, SystemUserId, Message, EntityId
| join (
Dynamics365Activity
| project UserId, EntityId, SystemUserId
) on $left.EntityId == $right.SystemUserId
| project TimeGenerated, UserId, Message, UserId1
| order by TimeGenerated desc
This KQL is returning redundant results. Any help would be highly appreciated