Using allyl 3,4,6-tri-O-acetyl-2-deoxy-2-phthalimido-β-d-glucopyranoside as a model substrate, it was shown that the degree of orthogonality of N-phthaloyl and O-allyl protective groups under the conditions of hydrazinolysis of the phthalimide group depends on the amount of atmospheric oxygen in the reaction mixture during the reaction and during the work-up procedure.