The present disclosure is directed to compounds of formula (I) and pharmaceutically acceptable salts thereof wherein Ring A Ring B R R R n and p are as defined herein which are active as modulators of retinoid related orphan receptor gamma t (RORt). These compounds prevent inhibit or suppress the action of RORt and are therefore useful in the treatment of RORt mediated diseases disorders syndromes or conditions such as e.g. pain inflammation COPD asthma rheumatoid arthritis colitis multiple sclerosis psoriasis neurodegenerative diseases and cancer.