The magnetization and torque of niobium samples of different shapes rotating in a magnetic field are studied with emphasis on the behavior near the upper critical field He2. The observed rotational magnetization is free of hysteresis and is found to represent a good approximation to the thermodynamic equilibrium magnetization of the samples if pinning is not too strong and the frequency of rotation is sufficiently low. The viscous contribution to the torque exhibits a step at HoE whose dependence on sample geometry is in good agreement with predictions derived under the simple assumption of a homogeneous arrangement of parallel straight vortices in the rotating sample.