Apparatus for assembling a magnetic position sensor on a rotor of an electrical machine, the magnetic position sensor comprising a magnetic element having a magnet, the rotor having a magnetic field, the apparatus comprising: - a supporting structure, - a pressure device connected to the supporting structure and comprising pressure means configured for exerting a pressure on the magnetic element to fasten the magnetic element in a seat of the rotor, and - a support, against which the rotor is abutted so that it is free of rotating around its own axis, to assemble the magnetic element on the rotor, - magnetic means (31, 32) configured to create a magnetic field which crosses the rotor and the magnetic element of the position sensor in order to orient the rotor and the magnetic element according to said magnetic field, to align the magnetic field of the magnetic element with the magnetic field of the rotor, - the magnetic means comprising first magnetic means, configured to generate the magnetic field which crosses the rotor, and second magnetic means, configured to generate the magnetic field aligned with the magnetic field generated by the first magnetic means which crosses the magnetic element of the position sensor; the apparatus further comprising: - connecting and orienting means connected to the pressure means and configured to connect the magnetic element of the position sensor to the pressure means, so that the magnetic element is free of being oriented under the action of the magnetic field created by the magnetic means (31, 32) aligning the magnetic field of the magnetic element to the magnetic field created by the magnetic means (31, 32); wherein the first magnetic means comprise two magnetic apparatuses arranged one in front of the other at the sides of the support, and the second magnetic means comprise a magnetic cylinder fastened to the pressure means; and the connecting and orienting means comprise an air bearing configured to allow the magnetic element rotation and/or oscillation movements and thereby to align the magnetic field of the magnetic element to the magnetic field created by the magnetic means (31, 32). - a supporting structure, - a pressure device connected to the supporting structure and comprising pressure means configured for exerting a pressure on the magnetic element to fasten the magnetic element in a seat of the rotor, and - a support, against which the rotor is abutted so that it is free of rotating around its own axis, to assemble the magnetic element on the rotor, - magnetic means (31, 32) configured to create a magnetic field which crosses the rotor and the magnetic element of the position sensor in order to orient the rotor and the magnetic element according to said magnetic field, to align the magnetic field of the magnetic element with the magnetic field of the rotor, - the magnetic means comprising first magnetic means, configured to generate the magnetic field which crosses the rotor, and second magnetic means, configured to generate the magnetic field aligned with the magnetic field generated by the first magnetic means which crosses the magnetic element of the position sensor; the apparatus further comprising: - connecting and orienting means connected to the pressure means and configured to connect the magnetic element of the position sensor to the pressure means, so that the magnetic element is free of being oriented under the action of the magnetic field created by the magnetic means (31, 32) aligning the magnetic field of the magnetic element to the magnetic field created by the magnetic means (31, 32); wherein the first magnetic means comprise two magnetic apparatuses arranged one in front of the other at the sides of the support, and the second magnetic means comprise a magnetic cylinder fastened to the pressure means; and the connecting and orienting means comprise an air bearing configured to allow the magnetic element rotation and/or oscillation movements and thereby to align the magnetic field of the magnetic element to the magnetic field created by the magnetic means (31, 32).