Recently I installed Debian 9 xfce on my home desktop, I was able to connect to the wi-fi network at the time of installation but after logging into desktop I am not able to connect to any wi-fi network using network manager.
After some searching I have found that this issue is due to the new privacy feature (MAC address randomization) in the new version of NetworkManager causing some wi-fi adaptors to stop working.
Follow below steps to fix this issue in Debian 9 and Ubuntu 17.04/17.10
Edit NetworkManager config file
sudo nano /etc/NetworkManager/NetworkManager.conf
Now add below lines to the file
Restart NetworkManager service
sudo systemctl restart NetworkManager
Now you will be able connect to wi-fi network.