Identifying a object on locked layer

How do you Identify an object on a locked layer? Obviously when you try to select it, nothing happens so you cannot go to properties and layers.

Is the only solution to unlock all layers?

You could use layer states for this. Make a layer state where the layers are locked as you want to work and then make one with all layers unlocked.