It can lower the effectiveness, but you should talk to a pharmacist, and let them know how much you were taking to get an official answer.
I don't know why no one let you know. I can't possibly answer that. Were they both aware that you are taking mag and zinc?
Always feel free to call your pharmacist and doctor with your questions. They know what doses you are on, and your medical history, and can best answer your questions for you.
You should definitely contact the doctor who prescribed the azith and find out if you need to be retreated, perhaps with doxycycline, which is now the preferred treatment for chlamydia in many places.