Intestinal dysbiosis in inflammatory bowel disease (IBD) patients depend on disease activity. We aimed to characterize the microbiota after 7 years of follow-up in an unselected cohort of IBD patients according to disease activity and disease severity. Fifty eight Crohn's disease (CD) and 82 ulcerative colitis (UC) patients were included. Disease activity was assessed by the Harvey-Bradshaw Index for CD and Simple Clinical Colitis Activity Index for UC. Microbiota diversity was assessed by 16S rDNA MiSeq sequencing. In UC patients with active disease and in CD patients with aggressive disease the richness (number of OTUs, p?=?0.018 and p?=?0.013, respectively) and diversity (Shannons index, p?=?0.017 and p?=?0.023, respectively) were significantly decreased. In the active UC group there was a significant decrease in abundance of the phylum Firmicutes (p?=?0.018). The same was found in CD patients with aggressive disease (p?=?0.05) while the abundance of Proteobacteria phylum showed a significant increase (p?=?0.03) in CD patients. We found a change in the microbial abundance in UC patients with active disease and in CD patients with aggressive disease. These results suggest that dysbiosis of the gut in IBD patients is not only related to current activity but also to the course of the disease.