The trading platforms will not allow you to take trades that will bring your margin utilization above 100%.
If you use the "Trade Ticket" (refer to image below - click on image to view in full screen) you will have a Margin-preview available, which gives you an indication of how much the "Available for Margin Trading" would change if you buy or sell the entered amount respectively, as highlighted in the below image.
If you take a trade that will reduce the available margin by more than you have "Available for Margin Trading" the system will alert you already before you take the trade (refer to the trade ticket furthest to the right in the below image). If you attempt to take a trade that would exceed margin limits, you will be rejected.
You can subsequently confirm in the activity log that this was indeed the reason the trade was rejected.
Click image to view full screen