Eric Schneiderman, New York’s attorney general, reached a milestone of sorts recently.

By moving to sue the Federal Communications Commission over net neutrality this month, his office took its 100th legal or administrative action against the Trump administration and congressional Republicans. His lawyers have challenged Mr. Trump’s first, second and third travel bans and sued over such diverse matters as a rollback in birth control coverage and a weakening of pollution standards. They have also unleashed a flurry of amicus briefs and formal letters, often with other Democratic attorneys general, assailing legislation they see as gutting consumer finance protections or civil rights.

“We try and protect New Yorkers from those who would do them harm,” Mr. Schneiderman said during a recent interview in his Manhattan office. “The biggest threat to New Yorkers right now is the federal government, so we’re responding to it.”

In Mr. Schneiderman’s seventh year as attorney general, the office has been transformed into a bulwark of resistance amid an unusually expansive level of confrontation with the federal government. Other Democratic state attorneys general are undertaking similar efforts, often in concert, like Xavier Becerra in California, where extra money was set aside in the budget for the attorney general to battle the Trump administration.

How far Mr. Schneiderman is willing to go in taking on Mr. Trump could define his political career, particularly in a blue state where disapproval of the president is high. The potential of the attorney general’s office for troublemaking and generating national headlines was redefined in the early 2000s by Eliot Spitzer. Mr. Schneiderman is a less combative man who was often the target of Mr. Trump’s Twitter wrath amid a three-year civil investigation into Trump University. In the end, Mr. Schneiderman’s office extracted a $25 million settlement in the case.