The solution is a method of distinguishing between benign and malignant biliary stenoses based on determining the bile acid content and comparing them with statistically obtained thresholds.