This paper studies confidential message transmission in a relay aided IoT system in the presence of cellular interference. Here the IoT devices share the same spectrum resources as the cellular users (CU) and an eavesdropper attempts to extract the confidential messages from these devices. For this system, the expressions for the mean square errors (MSE) at the legitimate and eavesdropping users have been formulated. The precoding matrices are then optimized in such a manner that the MSEs at the legitimate receivers are kept small, whereas MSE at the eavesdropper is large. The analysis shows that increasing interference from CU can degrade the MSE performance at the eavesdropper. Also, it can be seen that with increasing distance between the devices and the eavesdropper, the MSE at the eavesdropper increases. On the other hand, increasing the distance between the CU and the eavesdropper decreases the MSE at the eavesdropper. Finally, numerical simulation results are provided to verify the validity of the analysis.