Note: I can personally verify this works for the Xbox Wireless Controllers with built-in 3.5 mm stereo headset jack only. I don’t know how it works with other 1st party controllers, though the post below indicates that it should.
Basically you need a 2.5 mm TRS female to 3.5 mm TRRS male adapter. The headeset microphone does NOT work with regular 2.5 mm female to 3.5 mm male adapters.
Per thornierbird on Reddit:
More background information on headset compatibility with the Xbox One, including different 3.5 mm specs, is available from Xbox Support.