I do this sometimes. In my experience, the dishwasher won't shift very much of the thick black type of grease-gunk that chains, sprockets, jockey wheels, etc., can get coated in. It's good for getting a nice shine on parts that have already had the worst removed with a stronger solvent, or for shifting mud, dust or general road grime. Never noticed any corrosion issues. Most dishwashers have a rinse at the end of their program, anyhow.
Your dishwasher may vary, etc.