Originally Posted by
aidy
sounds like diplomatic protection and hence why no scanning
Diplomatic immunity, not diplomatic protection. Diplomatic protection is the legal device whereby a sovereign state has discretionary power (but not obligation) to permit one of its nationals (i.e. person or corporation) to access international dispute mechanisms (e.g. international court of justice) that are for sovereign states only: the sovereign state cloaks the national or corporation as if it were the state. This is a rarely used mechanism.
Diplomatic immunity enables an accredited diplomat engaging in the proper conduct of her/his duties to refuse to be searched at airports in the state to which she/he is accredited. Possibly also at other airports in transit, although that latter point is less clear.