Microalgae are increasingly attracting attention for the wastewater regeneration, removing nutrients, and obtaining a high-value product. These nutrients are essential for the growth of algae and aquatic plants, but an overabundance of them in aquatic ecosystems can cause eutrophication, so it is very important to control the concentration of these nutrients in wastewater discharges to the environment. In this study, we have carried out the adaptation of microalgae by gradually changing the influent from a culture medium to treated urban wastewater in membrane photobioreactors, analysing the consortium of microalgae and bacteria present and evaluating the removal of nutrients such us nitrogen and phosphorus. A satisfactory adaptation was observed, reaching concentrations of 0.164 g/L at the end of the study. In the case of the chlorophyte communities studied, it was found that the predominant species was the same in all adaptation phases (unclassified environmental Eukaryota), as well as in the photobioreactors that worked in parallel under extreme conditions. Regarding nitrogen and phosphorus removal during the adaptation phases, the values increased in both cases, reaching 96.99% and 48.10%, respectively. Following the microbiological study, bacterial families have been detected that show symbiotic activity during the growth of microalgae. Multidimensional scaling revealed positive correlations between the detected microalgae and nitrogen removal in the membrane photobioreactor. Our data suggest that MPBRs are a potential tertiary treatment that can produce microalgae biomass from real treated wastewater by utilising its nitrogen and phosphorus content, resulting in a higher quality effluent that is less harmful to the environment.