Ummmm what? They have a whole lesson on security https://github.com/microsoft/IoT-For-Beginners/blob/main/2-f...
Why do you need to secure IoT devices?
Cryptography
Secure your IoT devices
Generate and use an X.509 certificate