The present invention relates to methods and novel intermediates useful in the preparation of a compound or a pharmaceutically acceptable salt thereof. An objective of the present invention is to provide methods of preparing bile acid derivatives and novel intermediates. A use of the methods and intermediates described relates to the synthesis of bile acid derivatives which activate both FXR and TGR5.