Provided are compounds of formula (I) and pharmaceutically acceptable salts thereof, wherein ring A, ring B, L, R 1 , R 2 , R a , R b , n, x, y and z are as defined herein, which are active as modulators of retinoid-related orphan receptor gamma t (RORyt).