WASHINGTON — As President Obama faced public criticism over his Oval Office address on terrorism this month, one lawmaker took a private moment during a holiday party at the White House to reassure the commander in chief.  “That was a good speech you gave last night, Mr. President,” Representative Steve Cohen, Democrat of Tennessee, told Mr. Obama as he stopped to have his picture taken with him in the photo line at the black-tie congressional ball last week. “It’s hard to be the grown-up in the nation.”  It was one of hundreds of seconds-long interactions that the president and the first lady, Michelle Obama, are having with guests at some of the 20 holiday receptions that crowd their lives each December. Eagerly anticipated, sometimes politically fraught and often agonizingly awkward, photo-line banter with the president has become a staple of the holiday season in Washington, where yuletide ritual meets professional opportunism — all in the course of about six seconds.  “You need to bomb the Iranian nuclear facilities,” Representative Michele Bachmann, Republican of Minnesota, told Mr. Obama last year in one such brief exchange, taking advantage of her last holiday soiree with the president before leaving Congress. The president told her that it was not that simple, according to an account she gave to The Washington Free Beacon.  Jokes are told, interviews are requested and unsolicited advice is given to the president along with handshakes, high-fives and the not-infrequent deer-in-headlights stare from a speechless guest. Family members are introduced — and often star-struck.  “To staff the president and first lady at the holiday photo line is to observe humanity in its most awkward state,” said Bill Burton, a former top press official in Mr. Obama’s White House.  Mr. Obama, who barely tolerates the schmoozing that is presidential tradition, does far fewer receiving lines than his predecessors. George W. Bush and his wife, Laura Bush, worked a photo line at each of the 25 holiday parties he hosted in 2008, his last year in office, but the Obama White House has eliminated all but a handful. Congress and the news media are among the groups that still stand in line for the presidential grip-and-grin.  The Obamas cut back the ritual in part because it is demanding and time-consuming — each line lasts as long as two and a half hours — and in part because they wanted to give as many people as possible an opportunity to visit the White House.  “It’s just long and tiring and pretty hard to get through,” Tina Tchen, Mrs. Obama’s chief of staff, said in an interview. “We also had to balance, from a staff perspective, having photo lines versus how many people we could get in.”  By eliminating the receiving line, Ms. Tchen said, the White House is able to invite twice as many guests to a party. But the private backlash has been fierce in some quarters.  The moment can be about much more than a picture. The congressional party at the White House last week was Mr. Obama’s first face-to-face encounter with Speaker Paul D. Ryan, Republican of Wisconsin, since Mr. Ryan assumed his post in November. If the two spoke about the year-end budget agreement needed to prevent the government from shutting down, neither side would say so.  Drama unfolds in the photo line as well. In 1999, a year after managing impeachment proceedings against President Bill Clinton, Representative James E. Rogan, Republican of California, lined up with his wife to be photographed with the president and Hillary Clinton.  When the Rogans’ turn came and they were announced, Mr. Rogan said in an interview, Mr. Clinton “kind of looked at me funny for a moment, then he let out this big sigh and gave me a huge smile and said: ‘Jim, thanks for coming. I’m really glad you’re here. Merry Christmas.’ ”  “It felt like he and I had kind of patched it up,” Mr. Rogan said. But Mrs. Clinton, who was distracted while saying goodbye to the previous guest, was not as friendly. When she finally noticed Mr. Rogan, her eyes widened with surprise, he said, and she gripped his hands tensely. “There was some iciness there and a bit of a grimace,” he said.  The encounter apparently touched a nerve at the White House. Soon after, the picture of the Rogans and the Clintons turned up in a widely read Washington newspaper column alongside an item suggesting that Mr. Rogan was hypocritical for promoting his rivalry with the Clintons in fund-raising appeals and then jockeying for a photograph with them at the White House.  Steve Elmendorf, a Democratic strategist and lobbyist with close ties to the White House who has attended holiday parties there for decades, said, “I was always surprised at the members of Congress who had adverse relationships with the president, sometimes very personal adverse relationships — either they went to the floor to impeach him or they went to the floor and called him a war criminal — but they would show up at the Christmas party with their spouse and their children in tow and pose for the picture like nothing had happened.”  There are few breaks for the Obamas in the crush of photo-line encounters. Aides make sure the president and first lady get brief moments to sip water or use a restroom, and extra padding is placed under the carpet they stand on in the Diplomatic Reception Room for added comfort. Guests are given color-coded, timed tickets telling them when to join the queue, and military social aides are on hand to move them speedily through, take their names and announce the guests when it is their turn for a portrait, captured by the official White House photographer.  “We always used to tell the president and Mrs. Bush beforehand how many clicks were to be expected that night so they would be mentally prepared,” said Amy Zantzinger, who served as Mrs. Bush’s social secretary. “What always surprised me was the person who wouldn’t move on, the person that had to tell a story or multiple stories and just would not budge.”  The military social aides also hold women’s purses, both for convenience and to discourage requests for autographs or selfies with the president.  Ann Compton, who covered the White House for 40 years for ABC News, said she almost always treated the photo as a crucial, although brief, opportunity to buttonhole the president with a question only he could answer. The exception was at the first President George Bush’s 1992 holiday party, a somber affair because he had just lost in his re-election campaign and was preparing to leave the White House.  Ms. Compton said that she and her husband had opted not to join the photo line, but that they then encountered the Bushes as they were posing with the last guests.  “Barbara Bush looked at me and said, ‘You weren’t in line,’ ” Ms. Compton recalled, “and I said, ‘Mrs. Bush, that was our Christmas present to you.’ ”  A version of this article appears in print on December 14, 2015, on page A17 of the New York edition with the headline: Holiday Photo Lines Even Santa Might Resist. Order Reprints| Today's Paper|Subscribe
The photo opportunities at parties can be grueling affairs for the president and first lady, who often receive star-struck stares or unsolicited advice.