WASHINGTON — The White House has forbidden members of President Obama’s cabinet to address the Democratic National Convention this month, a stark break from past policy that is intended to avoid the appearance that the administration’s final months are being consumed by the politics of Hillary Clinton’s campaign.

In 2012, as he campaigned for re-election, five members of the president’s cabinet addressed the party convention in Charlotte, N.C. But in issuing the prohibition this year, Mr. Obama’s chief of staff, Denis McDonough, decided to “send a signal about the primacy of the Obama administration’s responsibility to manage the government and serve the American people,” said Jennifer Friedman, the deputy White House press secretary.

It is hardly the first judgment that Mr. Obama’s team has had to make about how deeply to get involved as the president takes on an increasingly active role in the raucous campaign to succeed him — decisions that involve not only considerations of policy and appearances, but legal ones, as well.

Federal law requires top appointees to carefully separate their official duties from political ones, and those distinctions have taken on added significance this year, given the unusual nature of the race to succeed Mr. Obama.