Context : Aims : The detection of old neutron stars and stellar mass black holes in isolation is one of the cornerstones of compact object astrophysics . Microlensing surveys may help on this purpose since the lensing mechanism is independent of the emission properties of the lens . Indeed , several black hole candidates deriving through microlensing observations have been reported in the literature . The identification of counterparts , especially in the X-rays , would be a strong argument in favor of the compact nature of these lenses . Methods : We perform a cross-correlation between the catalogs of microlensing events by the OGLE , MACHO and MOA teams , and those of X-rays sources from XMM-Newton and Chandra satellites . Based on our previous work , we select only microlensing events with duration longer than one hundred days , which should contain a large fraction of lenses as compact objects . Our matching criterion takes into account the positional coincidence in the sky . Results : We find a single match between a microlensing event , OGLE 2004-BLG-81 ( t _ { E } \sim 103 days ) , and the X-ray source 2XMM J180540.5-273427 . The angular separation is \sim 0.5 arc-seconds , i.e . well inside the 90 \% error box of the X-ray source . The hardness ratios reported in the 2XMM catalog would suggest a hard spectrum with a peak between 2 and 4.5 keV or a softer but highly absorbed source . Moreover the microlensing event is not fully constrained , and possible association of the source star with a flaring cataclysmic variable or a RS Canum Venaticorum-like star have been suggested as well . Conclusions : The very small angular separation ( within uncertainties ) is a strong indicator that 2XMM J180540.5-273427 is the X-ray counterpart of the OGLE event . However , the uncertainties on both the nature of lensed system and the lens itself challenge the interpretation of 2XMM J180540.5-273427 as the first confirmed isolated black hole identified so far . In any case , it probes the diagnostic capacity of microlensing surveys and open the path for further identifications of black hole or neutron star candidates .