A ranking function is probably what you are looking for:
SELECT *
FROM (
SELECT UserID, UserName, LastAction, row_number() over(partition by UserId order by TransactionTime desc) RowNo
FROM UserActivities
WHERE OrganizationID = 26465
) t
where t.RowNo = 1