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 R1 to R3, W, X, Y, Z, and n represent those as defined in the specification, or a salt thereof, as an active ingredient.