Hypomagnesemia due to increased excretion by the kidney is caused by all except :
Digitalis toxicity is precipitated by hypomagnesemia but it itself does not cause this metabolic abnormality.
Drugs and toxins causing hypomagnesemia are:

Ethanol
Cisplatin
Foscarnet
Aminoglycosides 
Diuretics (Loop, Thiazide, osmotic)  
Pentamidine 
Cyclosporine 
Amphotericin B
Furosemide
Digitalis
Aminoglycoside
Cisplatin