Headset microphone not working

Hello, i have a pair of HP BY OMEN 800, an headset with integrated microphone. It has two cables and i plugged them in the rear ports, the mic cable in the mic port and the headphone mic into the headphone mic. The headphones works, but the microphone is recognized as internal audio and it plays what i listen to. How can i fix? THanks

Assuming you have Gnome, on upper right corner click settings… sound and verify you have your microphone as input device.

I don’t know of any system that has 2 mic ports on the rear.

Mine is:
pink → mic
light blue → line in
light green → speaker

I have another system with 6 ports (7.1 audio)
pink → mic
light blue → line in
light green → front speaker
black → rear speaker
grey → side speaker
brown → C-sub woofer

Some systems have more ports for audio on the rear, but AFAIK all follow the same color scheme for those 3 primary ports.

The mic should be connected to the pink
The headphone speakers should be connected to the green.

Or use the front ports for your headphones
Mine is headphone speakers and mic.
I think most are the same.