The effect of vacuum birefringence is one of the first predictions of quantum electrodynamics (QED): the presence of a charged Dirac field makes the vacuum birefringent when threaded by magnetic fields. This effect, extremely weak for terrestrial magnetic fields, becomes important for highly magnetized astrophysical objects, such as accreting black holes. In the X-ray regime, the polarization of photons traveling in the magnetosphere of a black hole is not frozen at emission but is changed by the local magnetic field. We show that, for photons traveling along the plane of the disk, where the field is expected to be partially organized, this results in a depolarization of the X-ray radiation. Because the amount of depolarization depends on the strength of the magnetic field, this effect can provide a way to probe the magnetic field in black-hole accretion disks and to study the role of magnetic fields in astrophysical accretion in general.