Bacteria associated with marine invertebrates are thought to have a range of important roles that benefit the host including production of compounds that may exclude pathogenic microorganisms and recycling of essential nutrients. This study characterised the microbiome of a gonochoric octocoral, Lobophytum pauciflorum, and investigated whether either sex or environmental stresses influenced the diversity of the associated microbiome through amplicon profiling of the bacterial 16S rRNA gene. Sequences affiliated to Spirochaetaceae and Endozoicimonaceae dominated the microbiome of L. pauciflorum, representing 43% and 21% of the community, respectively. Among the dominant class affiliations, no sex-specific differences were detected, though unassigned sequences were at a 2-fold higher relative abundance in samples from female individuals than from males. These potentially novel sequences contributed to observed differences between sexes as detected by a multivariate analysis at the OTU level. Exposing L. pauciflorum fragments to increased temperature (31°C), decreased pH (7.9) or both stressors simultaneously for 12 days did not significantly alter the microbial community, indicating that the soft coral microbiome is relatively resilient to short-term environmental stress.