Hi,
If you are using a headset with a single jack (for both the microphone and headphones), open the Realtek Audio Console from the Start menu and go to "Advanced settings."
Locate the jack where you plugged in your headset, click on the selection box, choose "Headphone," and check if the microphone is then recognized.
If you are using a Dell or HP laptop, unplug the cable and plug it back in; see if a prompt appears asking what type of device was connected—if it does, select "Headphone."
Please consider rating the question (by accepting the answer or otherwise) and visiting the Microsoft Q&A community if you have any further questions.
Thanks