Photoelectron spectroscopy (PES) and microscopy are highly important for exploring morphologically and chemically complex liquid-gas, solid-liquid and solid-gas interfaces under realistic conditions, but the very small electron mean free path inside dense media imposes serious experimental challenges. Currently, near ambient pressure PES is conducted using dexterously designed electron energy analyzers coupled with differentially pumped electron lenses which make it possible to conduct PES measurements at a few hPa. This report proposes an alternative ambient pressure approach that can be applied to a broad class of samples and be implemented in conventional PES instruments. It uses ultrathin electron transparent but molecular impermeable membranes to isolate the high pressure sample environment from the high vacuum PES detection system. We demonstrate that the separating graphene membrane windows are both mechanically robust and sufficiently transparent for electrons in a wide energy range to allow soft X-ray PES of liquid and gaseous water. The performed proof-of-principle experiments confirm the possibility to probe vacuum-incompatible toxic or reactive samples placed inside such hermetic, gas flow or fluidic environmental cells.