What's your goal for the detection rule? You can retrieve the process activity for TeamViewer using the simple query below but you'll need to be specific in what you're looking for to build a detection rule.
DeviceProcessEvents
| where InitiatingProcessVersionInfoProductName == "TeamViewer"