GAIA is the "super-Hipparcos" survey satellite selected as a Cornerstone 6 mission by the European Space Agency. GAIA can measure microlensing by the brightening of source stars. For the broad G band photometer, the all-sky source-averaged photometric optical depth is ∼ 10 −7 . There are ∼ 1300 photometric microlensing events for which GAIA will measure at least one datapoint on the amplified lightcurve. GAIA can also measure microlensing by the small excursions of the light centroid that occur during events. The all-sky source-averaged astrometric microlensing optical depth is ∼ 2.5 × 10 −5 . Some ∼ 25000 sources will have a significant variation of the centroid shift, together with a closest approach, during the lifetime of the mission. This is not the actual number of events that can be extracted from the GAIA dataset, as the false detection rate has not been assessed.A covariance analysis is used to study the propagation of errors and the estimation of parameters from realistic sampling of the GAIA datastream of transits in the alongscan direction during microlensing events. The mass of the lens can be calculated to good accuracy if the lens is nearby so that angular Einstein radius θ E is large; if the Einstein radius projected onto the observer planer E is about an astronomical unit; if the duration of the astrometric event is long ( ∼ > 1 year) or if the source star is bright. Monte Carlo simulations are used to study the ∼ 2500 events for which the mass can be recovered with an error of < 50%. These high quality events are dominated by disk lenses within a few tens of parsecs and source stars within a few hundred parsecs. We show that the local mass function can be recovered from the high quality sample to good accuracy. GAIA is the first instrument with the capabilities of measuring the mass locally in very faint objects like black holes and very cool white and brown dwarfs.For only ∼ 5% of all astrometric events will GAIA record even one photometric datapoint. There is a need for a dedicated telescope that densely samples the Galactic Centre and spiral arms, as this can improve the accuracy of parameter estimation by a factor of ∼ 10. The total number of sources that have an astrometric microlensing variation exceeding the mission target accuracy is ∼ 10 5 . The positional measurement of one source in every twenty thousand is affected by microlensing noise at any instant. We show that microlensing is negligible as an unbiased random error source for GAIA.