BOSTON (AP) — Massachusetts is teaming with federal officials to help migrants in the state apply for work authorization permits even as advocates pursue a class action lawsuit seeking to block Democratic Gov. Maura Healey from imposing what they describe as an artificial cap on the number of families offered immediate shelter.

Healey has urged Biden administration officials to streamline access to the permits, saying they’re key to helping migrants find a job and leave the state’s overburdened shelter system.

As part of the collaboration, the Healey administration and federal Department of Homeland Security will host a work authorization clinic for migrants in emergency family shelters. The state will organize appointments and provide transportation. Biden administration officials will help collect and process work authorization requests.

“This clinic will be critical for building on the work that our administration has already been leading to connect more migrants with work opportunities, which will help them support their families and move out of emergency shelter into more stable housing options,” Healey said in a statement.

Days ago, a lawsuit was filed challenging Healey on her efforts to limit the number of migrant families offered shelter.

Healey warned two weeks ago that the state’s emergency family shelter system would reach its capacity of 7,500 families — or about 24,000 people — by the end of the month. Healey said the system has been expanding at an unsustainable rate to handle the demand of newly arriving migrant families.

As a “right-to-shelter” state, Massachusetts is legally required to provide shelter to eligible families through its emergency assistance program.

Healey said the state isn’t abandoning the law, but after Nov. 1, families seeking shelter will be assessed and those with the highest needs will be prioritized. Families that can’t immediately be placed in shelter will be put on a waiting list.

Lawyers for Civil Rights, a nonprofit based in Boston, said the class action lawsuit seeks to delay Healey’s actions, arguing that the changes are being rushed into place, without any public process or required notice to the Legislature.

The group said the lawsuit, filed on behalf of three families on the brink of homelessness, seeks a temporary restraining order to stop the state from undermining the shelter law.

“It is illegal and unconscionable for the state to rush these changes into place and force homeless families into the streets just as the winter months are approaching,” Oren Sellstrom of Lawyers for Civil Rights, said in a statement last week.

“The law requires the state to proceed in an orderly manner, to hear from the public, and to give the Legislature a chance to weigh in on — and potentially forestall — these draconian changes,” she added.

When the Legislature funded the program, it specifically required the agency in charge — the Executive Office of Housing and Livable Communities — to give lawmakers 90 days notice of any changes, time the Legislature could use to evaluate and potentially prevent the changes, Sellstrom said.

A spokesperson for the state Executive Office of Housing and Livable Communities said the agency is “reviewing the filing and will be offering no further comment at this time.”

Democratic Massachusetts House Speaker Ronald Mariano said Monday that the House has no plans to change the state’s 1983 right-to-shelter law but continues to evaluate the need for additional funding.

Any temporary policy changes would be better addressed by Healey by issuing an executive order formally declaring a state of emergency, Mariano said.

Families are spread out across hundreds of locations in 90 cities and towns in a range of facilities, from traditional shelters to temporary sites like college dorms. About half of those in emergency shelter are children.