New York Attorney General Letitia James announced an investigation into Facebook on Thursday over its harvesting of email contacts for up to 1.5 million users, adding to the mounting legal and regulatory worries for the social media service.

Facebook disclosed last week that it may have “unintentionally uploaded” the email contacts without users’ permission or knowledge when they signed up for new accounts beginning in May 2016. Facebook said it would delete the contacts.

James said the total number of people whose information was improperly obtained may be in the hundreds of millions.

“It is time Facebook is held accountable for how it handles consumers' personal information,” James said in a statement. “Facebook has repeatedly demonstrated a lack of respect for consumers’ information while at the same time profiting from mining that data.”

Facebook said in a statement: “We’re in touch with the New York State attorney general’s office and are responding to their questions on this matter.”

New York is already one of many states that, along with the Federal Trade Commission, are investigating Facebook for the company’s data and privacy practices. That investigation, begun last year, grew out of the collection of Facebook user and friend data that was eventually acquired by the British consulting firm Cambridge Analytica.

Facebook warned investors on Wednesday that the FTC fine for its privacy practices could be as high as $5 billion, which would be a record for the FTC but still too low for some of Facebook’s harshest critics in Congress and elsewhere.