Try setting the microsteps to 1/8 or 1/10 (1600-2000 steps/rev). If you are getting resonance, this should help.
Also, when a motor is not mounted to anything, it's more susceptible to resonance, so it may actually be worse when it's not on the machine.
What control are you using?