Free-space optics (FSO) is an attractive technology to meet the ever-growing demand for wireless bandwidth in next generation networks. To increase the spectral efficiency of FSO links, transmission over spatial division multiplexing (SDM) can be exploited, where orthogonal light beams have to be shaped according to suitable amplitude, phase, and polarization profiles. In this work, we show that a programmable photonic circuits, consisting of a silicon photonic mesh of tunable Mach-Zehnder Interferometers (MZIs) can be used as an adaptive multibeam receiver for a FSO communication link. The circuit can self-configure to simultaneously receive and separate, with negligible mutual crosstalk, signals carried by orthogonal FSO beams sharing the same wavelength and polarization. This feature is demonstrated on signal pairs either arriving at the receiver from orthogonal directions (direction-diversity) or being shaped according to different orthogonal spatial modes (mode-diversity), even in the presence of some mixing during propagation. The performance of programmable mesh as an adaptive multibeam receiver is assessed by means of data channel transmission at 10 Gbit/s a wavelength of 1550 nm, but the optical bandwidth of the receiver (>40 nm) allows its use at much higher data rates as well as in wavelength-division multiplexing SDM communication links.