Make, model, year, please ...
A good many bikes use needle roller bearings in that location. Others use a ball joint. Others use a rubber bushing. There may be other designs.
Rubber bushings pressed into the shock eye with a bonded steel sleeve inside (through which the bolt passes) are not designed to be lubricated. (Same design that automotive control arms use at the pivot points nowadays.) The pivoting is done by flexing the rubber - lubrication is not needed (and can ruin the rubber if you try).
The others can benefit from being greased now and again ... but you have to take it all apart to get grease inside beyond the seals.
If you merely have the bolt out ... a light coating of grease can stop it from rusting and being extremely difficult to remove in the future.