The team -- along with a strong showing of top presidential aides and allies -- celebrated their first World Series title in more than a century.
"There were a lot of sick days during the playoffs," Obama said, noting the heavy presence of Cubs fans in his administration. "One of my staff members was caught being interviewed at a bar outside of Wrigley."
The President, who began his political career in Chicago and will build his library in the city's Jackson Park, is not a Cubs fan. He roots for their South Side neighbors, the White Sox. For that, Cubs president of baseball operations Theo Epstein offered Obama "a midnight pardon for all your indiscretions as a baseball fan."
Obama also set political allegiances aside to congratulate the team whose co-owner, Todd Ricketts, was a donor to President-elect Donald Trump and tapped to serve as his deputy commerce secretary.
As White House spectacles go, the Cubs' visit will likely rank as the second least likely of this inaugural week. It caps off an improbable season for a team beset for decades by an improbably long championship drought. Their last World Series victory came in 1908, when Teddy Roosevelt was president. It did not earn them a similar invitation.
"The Cubs know what it's like to be loyal and to persevere, and to hope and suffer, and then to keep on hoping," Obama said, before calling out the names of franchise greats like Billy Williams, Ferguson Jenkins and Ryne Sandberg, all of whom made the trip. First lady Michelle Obama's favorite player growing up, Jose Cardenal, was also in the audience.
Congratulating Epstein, Obama noted his success as a turnaround artist -- the 43-year-old led the Boston Red Sox to two World Series wins, in 2004 and 2007, after 86 dry years -- and joked that he was trying to convince the young executive to take on another "organization that is wandering in the wilderness."
"I've talked to him about being (Democratic National Committee) chair," Obama said to laughs. "But he's decided, wisely, to stick to baseball."
Epstein in reply offered the President his pardon and an enviable collection of team swag, including a lifetime pass to Wrigley Field and a "W" flag -- the kind the team flies over its stadium walls after a win -- signed by the entire club.
"Mr. President, thank you for the dignity and integrity with which you've served this country the past eight years," Epstein said, turning to look at Obama, who nodded solemnly in return.