Anaerobic digestion (AD) is a well-established technology that simultaneously stabilizes organic pollutants and produces renewable biogas. Biogas upgrading enhances its fuel quality by removing gaseous impurities, enabling broader and higher-value applications across various sectors. This study investigated an environmentally enriched microalgae-bacteria consortium for photosynthetic biogas upgrading using real AD effluent as nutrient source, with a focus on microbial structural and functional responses to a wide range of H2S concentrations (0-10,000 ppmv in biogas). The experimental cultures were operated in a semi-continuous, mixed-culture system without pH control to reflect the practical constraints of realistic operational conditions. At H2S levels up to 5,000 ppmv, the cultures maintained efficient biogas upgrading with a CO2 removal rate of 4.75 mmol/Ld, over 10 % higher than the H2S-free control (4.28 mmol/Ld), and comparable ammonium removal (>65 %) even under acidified conditions (pH < 4) resulting from ammonium assimilation. At 10,000 ppmv H2S, both CO2 fixation and ammonium removal were significantly suppressed initially but recovered substantially, though not fully, following an adaptation lag. Microbial community profiling revealed the overwhelming dominance of stress-tolerant Parachlorella in the microalgal communities (>94 % of 18S rRNA gene reads) across all conditions, which likely accounts for the observed resilience. Although H2S had a significant influence on the bacterial community structure, the persistent prevalence of sulfide-oxidizing Fuscovulum and microalgae-associated Mucilaginibacter, Paraburkholderia, and Sphingomonas also likely supported the ecological adaptability and functional resilience of the cultures. These findings offer advanced insights into the potential of environmental microalgae-bacteria consortia for sustainable biogas upgrading and digestate valorization.