Clothing, usually of a specific colour/design, and insignia, worn by members of the same military unit. In international armed conflicts, combatants have an obligation to distinguish themselves from the civilian population and this can be achieved by wearing a uniform. Therefore, members of the armed forces engaged in or preparing an attack without wearing a uniform and/or failing to carry their arms openly are not entitled to the status of prisoner of war. The feigning of protected status by wearing the uniforms of the United Nations or of a neutral or other non-belligerent State is prohibited by IHL. A combatant attempting to gather information on the territory of the adverse party while in uniform shall not be considered a spy (and will therefore benefit from prisoner of war status if captured).
Obligation for combatants to distinguish themselves
PFANNER Toni, “Military Uniforms and the Law of War”, in IRRC, No. 853, March 2004, pp. 93-130
Wearing of uniforms of UN, neutral or other States not party to the conflict
Necessity (or other distinction) for combatant or belligerent status