In 1922–1923, he worked as Consul General in Vienna and Deputy Plenipotentiary in Austria. Soon he was transferred to diplomatic work in Rome, and then to Berlin. In 1923, he was recalled from the diplomatic service and was appointed chief legal adviser of the People's Commissariat of Railways. In 1924, he was a delegate to the 13th Congress of the RCP(b).