Ms. Rosa, 47, a Democrat elected in 2012, was among the most junior members of the Assembly.

Later, outside the courthouse, Ms. Rosa told reporters that she regretted her actions, but she said that her crimes had occurred before she had become a member of the Assembly.

“I didn’t get rich out of my position,” Ms. Rosa said. “I didn’t take any bribes. I didn’t do none of the things that usually you are very used to seeing in the other guys that get in this situation.”

In court, a prosecutor, Howard S. Master, did not explain how the investigation into Ms. Rosa had begun, but he said she had a lawyer appointed to represent her when she became “a target” of a grand jury investigation.

Ms. Rosa’s lawyer, Matthew D. Myers, said after the proceeding: “I think generally they’re investigating a lot of political corruption in this town, and maybe stumbled upon this. I can’t speak for their entire investigation, but obviously, she wasn’t a main target at the start of this investigation.”

The case involving Ms. Rosa is another in a long string of public corruption cases filed in recent years by federal prosecutors involving public officials in Albany.

In January, Eric A. Stevenson, a Democratic assemblyman from the Bronx, was convicted of bribery and other corruption charges; in May, he was sentenced to three years in prison. This month, Malcolm A. Smith, a Democratic state senator from Queens, was granted a mistrial in his trial on bribery and wire fraud charges; Mr. Smith, who has pleaded not guilty, is to be retried in January. And William F. Boyland Jr., a Democratic assemblyman from one of Brooklyn’s prominent political families, was convicted in March of bribery and other charges in federal court in Brooklyn.

In late March, Gov. Andrew M. Cuomo abruptly disbanded a panel he had established to investigate corruption in state government and develop reforms that would help deter it. His decision prompted an unusual public rebuke from Mr. Bharara, whose office received the panel’s investigatory files and is now examining the circumstances surrounding its dismissal.