Defense Secretary James Mattis served as an unpaid military adviser to the United Arab Emirates before joining the Trump administration, CNN first reported Wednesday.

The Pentagon reportedly gave Mattis permission to take on the informal advisory role in 2015, during his time as a fellow at the Hoover Institution at Stanford University. He also received approval to work for the UAE from the State Department.

Pentagon spokesman Jeff Davis said Mattis advised the UAE on rebuilding its military. He was not representing the U.S. government and was reimbursed for travel by the UAE, Davis added.

Though not previously made public, Mattis properly disclosed the information when he was nominated to be defense secretary, CNN said.