Azathioprine is metabolised to the active compound mercaptopurine, a purine analogue that inhibits purine synthesis.
A thiopurine methyltransferase (TPMT) activity (not concentration) is checked before initiating the drug to prevent azathioprine toxicity.

Adverse effects include

A significant interaction may occur with allopurinol and hence lower doses of azathioprine should be used.
Xanthine oxidase is also involved in the conversion of purine compounds to uric acid. Allopurinol acts by inhibiting xanthine oxidase, limiting uric acid formation and therefore preventing recurrent gout. However, when allopurinol and azathioprine are co-administered, allopurinol will limit azathioprine metabolism, making the patient prone to azathioprine- related myelosuppression.
Azathioprine is generally considered safe to use in pregnancy.