He grew up there and in England and Germany, and was educated at a Realgymnasium in Stuttgart, Blundell's School in Tiverton, and at Balliol College, Oxford (where he was Taylorian Scholar).
Bray passed the Indian Civil Service examination of 1898, and served in the Punjab, Khyber Pakhtunkhwa, and Baluchistan.
He had a large share in shaping the treaty with Afghanistan negotiated at Kabul by Sir Henry Dobbs in 1921 (which amended the Treaty of Rawalpindi, agreed originally in August 1919, and reaffirmed Britain's recognition of Afghanistan's complete independence, and restored to the Afghans the privilege of importing munitions through India).
King Amanullah’s impatient forcing of Western ways on his people after visiting Europe in 1928 led to a revolt, and grave danger to the inmates of the British Legation at Kabul.
Early in 1929, Bray was responsible for the plans for the evacuation by air (a novel method at that time) of the women and children, and then of the Minister, Sir Francis Humphreys, and his staff as part of the Kabul Airlift.