One book of Sharia Law called "Reliance of the Traveler" (page 746; 8.2) states:
Speaking is a means to achieve objectives. If a praiseworthy aim is attainable through both telling the truth and lying, it is unlawful to accomplish through lying because there is no need for it. When it is possible to achieve such an aim by lying but not by telling the truth, it is permissible to lie if attaining the goal is permissible (N:i.e. when the purpose of lying is to circumvent someone who is preventing one from doing something permissible), and obligatory to lie if the goal is obligatory...it is religiously precautionary in all cases to employ words that give a misleading impression.