The trick involves dealing with the squishiness of the almond paste. You don't want it to go soft in your hand, and you don't want it to glom up the cutting surface of your grater.

Well, really the trick is to put the almond paste in the freezer for a while to firm up, so that it can be grated. How long that will take depends on the shape and size of the almond paste and how soft it is to begin with. If it's a small log, as is sold in many supermarkets, we would put it in the freezer for a half hour or so. If it's a big chunk from a can, or that you've made yourself, it may take longer to become firm.

If you're grating by hand and it becomes unacceptably mushy, you may need to put it back in the freezer to firm up a bit more.

We would use the largest holes of a box grater or the grating disk of a food processor. We are often impressed with how well the food processor grates a medium-squishy ball of mozzarella, which mostly turns to mush on a box grater. In this case, speed may be your friend.