Desorption atmospheric pressure photoionization (DAPPI) is an ambient ionization technique for mass spectrometry (MS) that can be used to ionize polar as well as neutral and completely non-polar analytes. In this study polydimethylsiloxane (PDMS) was used as a solid phase extraction sorbent for DAPPI-MS analysis. Pieces of PDMS polymer were soaked in an aqueous sample, where the analytes were sorbed from the sample solution to PDMS. After this, the extracted analytes were desorbed directly from the polymer by the hot DAPPI spray solvent plume, without an elution step. Swelling and extracting the PDMS with a cleaning solvent prior to extraction diminished the high background in the DAPPI mass spectrum caused by PDMS oligomers. Acetone, hexane, pentane, toluene, diisopropylamine and triethylamine were tested for this purpose. The amines were most efficient in reducing the PDMS background, but they also suppressed the signals of low proton affinity analytes. Toluene was chosen as the optimum cleaning solvent, since it reduced the PDMS background efficiently and gave intensive signals of most of the studied analytes. The effects of DAPPI spray solvents toluene, acetone and anisole on the PDMS background and the ionization of analytes were also compared and extraction conditions were optimized. Anisole gave a low background for native PDMS, but toluene ionized the widest range of analytes. Analysis of verapamil, testosterone and anthracene from purified, spiked wastewater was performed to demonstrate that the method is suited for in-situ analysis of water streams. In addition, urine spiked with several analytes was analyzed by the PDMS method and compared to the conventional DAPPI procedure, where sample droplets are applied on PMMA surface. With the PDMS method the background ion signals caused by the urine matrix were lower, the S/N ratios of analytes were 2–10 times higher, and testosterone, anthracene and benzo[a]pyrene that were not detected from PMMA in urine, were observed in the MS spectrum.