It is narrated on the authority of Abdullah b. Umar who narrates from the Prophet of Allah (ﷺ) who said
He who took up arms against us is not of us.
Iyas b. Salama narrated from his father that the Apostle (ﷺ) observed
He who draws the sword against us is not of us.
It is narrated on the authority of Abu Musa Ash'ari
He who took up arms against us is not of us.