Teamviewer may also connect via http/https to their (proxy) servers. In addition to blocking TCP port 9538 in general, we have added "teamviewer.com" (no wildcards, it captures second-level domains as well) to a custom web rating override category (i.e. "blacklist"), which is blocked in the web filter profile (using certificate inspection only). This should improve the detection/blocking in general.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.