Provided is a preventive and/or therapeutic agent for immune diseases containing a compound having a BTK inhibitory activity or a salt thereof, as an active ingredient. A preventive and/or therapeutic agent of immune diseases, comprising a compound represented by Formula (I), where R 1 to R 3 , W, X, Y, Z, and n represent those as defined in the specification, or a salt thereof, as an active ingredient.本發明提供一種免疫疾病之預防及/或治療劑,其含有具有BTK抑制作用之化合物或其鹽作為有效成分。本發明之免疫疾病之預防及/或治療劑含有式(I)[式中,R1~R3、W、X、Y、Z及n具有如說明書中所定義之含義]所表示之化合物或其鹽作為有效成分。