Try the following
AppEvents
| where Name in ("MSAGEPASSKEYS_CANCELPROCESS_INITIATED", "PasskeyAdd-Success", "PasskeyRemove-Success")
| extend obj = tostring(Properties.ObjectId), session = tostring(Properties.CorrelationId)
| summarize EventList = make_set(Name) by session, obj
| extend
HasCancel = EventList has "MSAGEPASSKEYS_CANCELPROCESS_INITIATED",
HasAdd = EventList has "PasskeyAdd-Success",
HasRemove = EventList has "PasskeyRemove-Success"
| extend FinalEvent = iff(HasAdd, "PasskeyAdd-Success",
iff(HasRemove, "PasskeyRemove-Success",
iff(HasCancel, "MSAGEPASSKEYS_CANCELPROCESS_INITIATED", "Other")))
| where FinalEvent != "Other"
| summarize count() by FinalEvent
| sort by FinalEvent asc
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin