There are only a handful of ways immigrants can obtain green cards, and the largest share of them each year are given out based on familial connections.
The plan, which Trump reiterated last week at a Wilkes-Barre, Pennsylvania rally, would limit immigrants like his wife to sponsoring only their spouses and underage children to join them in the United States - not their parents, adult children or siblings.
It's unclear whether Mr and Mrs Knavs had their green cards granted by a process the President Trump has sought to end.
President Trump has campaigned against family-based or so-called "chain" immigration in the past.
The Knavses' lawyer said their ceremony was kept private for "security reasons".
She settled in NY in 1996 and met Mr Trump two years later. "I've been a very staunch advocate against the president's policies myself as an immigration lawyer", Wildes said.More news: ‘Superman’ Actress Margot Kidder’s Cause of Death Released
News of the ceremony prompted an immediate response on Twitter, with tweets ranging from "welcome!" to "unfreakingbelievable".
Wildes wouldn't say how long the Knavses have lived in the US. As is customary, the couple held their hands over their hearts and recited the Pledge of Allegiance, he said.
The Knavses raised Melania in the rural industrial town of Sevnica while Slovenia was under Communist rule. There, Viktor Knavs was a travelling auto salesman and belonged to the Communist Party. Amalija worked in a textile factory.
The Jacob J. Javits Federal Building, at 26 Federal Plaza, also houses immigration court and the local offices of the Department of Homeland Security, and its subsidiary, Immigration and Customs Enforcement.
She attended high school in the Slovenian capital, Ljubljana, and changed her name to Melania Knauss when she started modelling. Curious about the cameras, bystanders wandered over.
He maintains there should instead be a merit-based system, which prioritises professionals over relatives, and has drawn censure for his strident attacks on immigration laws and immigrants. One for the people who have no power, and one for the people who we are letting in through the VIP entrance.