Michael ends up being the best man at Dwight's wedding in season 9 of "The Office." In the series finale, Dwight initially expects Jim to serve as his best man, but Jim secretly arranges for Michael Scott to return from Colorado and take the role instead.
Michael's appearance is especially meaningful because he had left Dunder Mifflin near the end of season 7 and moved away with Holly Flax. His surprise return reunites him with the Scranton employees and gives Dwight a personal connection to the show's former manager during the wedding ceremony.
Dwight calls Michael his "bestest mensch," reflecting both their unusual friendship and Dwight's admiration for him. A common mix-up is Jim, since Dwight believes Jim is his best man for much of the wedding episode. Jim is part of the surprise, but Michael is the person who ultimately stands beside Dwight.