he met louis xv and his mistress , madame de pompadour , as soon as he arrived in paris , quickly ensconcing himself as the king 's confidant , to the consternation of his ministers and the jealousy of the court .