Microbialites are common carbonate structures in cryptic niches of marine environments throughout geological time. In this research we compare the microbialites of small bioconstructions (biostalactites) of modern submarine caves of Sicily with those developed in small crypts of Carnian patch reefs of the Dolomite Mountains (Heiligkreuz Formation, Alpe di Specie) using Raman spectroscopy, a method that allows in situ determination of the organic content of microbial components. This methodology partly solves the uncertainty of geomicrobiological studies that use bulk measurements (i.e., biomarker analyses), which make it difficult to associate mineral precipitates with a specific microbial process. In the modern marine caves, the complex biotic relationships among skeletal organisms (mainly serpulids) and microbial communities produced biostalactites in which microbially induced biomineralization is the consequence of autotrophic and chemoheterotrophic bacterial activities. Sulfate-reducing bacteria, fed by metazoan organic matter, flourish in millimetric oxygen-depleted cavities of the skeletal framework, and induce autochthonous micrite deposition and early stabilization of the biostalactites. Similar processes have been interpreted to induce the deposition of the microbialites in the Upper Triassic patch reefs of the Dolomites. These small shallow water reefs, made up mainly of scleractinian corals, sponges and red algae, hold a skeletal framework rich in millimeter- to centimeter-size cavities, ideal cryptic niches for growth of microbial communities. Specific sulfate-reducing bacteria biomarkers are first identified using bulk measurements obtained by solvent extraction. The subsequent in situ characterization of organic compounds through micro-Raman spectroscopy indicates the same biogeochemical signatures of the microbialites within the cryptic cavities of the biostalactites of modern marine caves as those inside the skeletal framework of Carnian patch reefs. These data, showing the same processes in Triassic and modern cryptic microenvironments, is evidence that the microbially mediated precipitation in confined environments is a process independent of geological time that further investigation may be able to test.