In recent years the development of new methods of storing, trapping or separating light gases, such as CO2, CH4 and CO has become of utmost importance from an environmental and energetic point of view. Porous materials such as zeolites and porous organic polymers have long been considered good candidates for this purpose. More recently, the ample spectrum of existing metal organic frameworks (MOFs) together with their functional and mechanical properties have attracted even further interest. The porous channels found in these materials are ideal for the uptake of guests of different shapes and sizes, and with careful design they can show high selectivity. Adsorption properties of MOFs have been thoroughly studied, however obtaining in depth structural insight into the adsorption/desorption mechanism of these materials is challenging. For example, out of the hundreds of MOF structures published to date, there are less than 20 entries currently in the CSD in which the CO2 molecule can be located. Here we present our novel findings using the high-pressure gas cell at the Diamond Light Source on beamline I19, where we have studied the inclusion of CO2, CH4 and CO on the microporous scandium framework, Sc2BDC3 (BDC = benzene-1,4-dicarboxylate) and its amino-functionalised derivative, Sc2(BDC-NH2)3. Here, the different adsorption sites for CO2, CH4 and CO in both frameworks have been determined as a function of increasing gas pressure. These structures, coupled with Density Functional Theory calculations, have helped to elucidate the host-guest interactions governing the different levels of selectivity shown by both Sc2BDC3 and Sc2(BDC-NH2)3. Additionally, gas mixtures have also been studied; in particular CO2/CH4 mixtures of different compositions, explaining the selectivity of the frameworks for CO2 over other gases and showing the great potential of in situ structural experiments for investigation of the potential applications of MOFs.