Direct detection of a magnetic field in the innermost regions of an accretion disk