"Thank you for your support and for your letter of condolences for our fallen following this attack," Mattis told Parly when they met on Friday.
French helicopters, backed up by warplanes, arrived to evacuate the US victims within 30 minutes of the ambush by about 50 attackers, thought to be jihadists, near the Mali border.
Four Americans were killed and two wounded.
One of the American soldiers, Sgt La David Johnson, was separated from the joint US-Niger patrol and his body was not found for 48 hours, not by the US military but by local people.
It is not clear whether he was alive when the rescue mission left the scene.
Controversy in US
The news has sparked a series of controversies in the US.
Congresswoman Frederica Wilson has accused Trump of insensitivity in a phone call with Johnson's widow and politicians have asked whether the US mission failed in information-gathering and providing backup for the patrol.
With many Americans suprised to learn their country has troops in the region, there are also questions as to whether has given enough information on the mission, the deadliest since Trump took office.
It has emerged that the US, which has been expanding iits military presence in Africa since Barack Obama's term as president, has about 1,000 troops in the Sahel region, providing support and training to a French-led operation aiming to tackle armed Islamists and smugglers.
Mattis has so far avoided saying whether Trump authorised the mission.
Chad travel ban
Another country involved in the anti-Islamist drive is Chad, which has been affected by Trump's travel ban, to the dismay of its leaders who recently withdrew their troops from Niger.
"We mentioned the fact Chad is an important, effective ally engaged in this area of the Sahel and that therefore we must help Chad answer all the questions that have been posed by the US administration," Parly said.
The minister also defended the nuclear deal with Iran, which Trump had refused to certify and threatened to pull out of.
"There's no way we should leave the Vienna agreement negotiated in 2015 as long as all the conditions made of Iran are being met," she said, adding that the International Atomic Energy Authority.