We study the Ehresmann-Schauenburg bialgebroid of a noncommutative principal bundle as a quantization of the gauge groupoid of a classical principal bundle. We show that the gauge group of the noncommutative bundle is isomorphic to the group of bisections of the bialgebroid, and we give a crossed module structure for the bisections and the automorphisms of the bialgebroid. Examples include: Galois objects of Taft algebras, a monopole bundle over a quantum sphere and a not faithfully flat Hopf-Galois extension of commutative algebras. For each of the latter two examples, there is in fact a suitable invertible antipode for the bialgebroid making it a Hopf algebroid.