The present invention relates to compounds of Formula (I), and pharmaceutically acceptable salts thereof, where R1, R2, R3, R4, R5, R6, R7, R8 and m are as defined herein, pharmaceutical compositions comprising these compounds and methods of use of these compounds for treating a TGR5 mediated disease or condition.