I was offered this before I walked the S:t Olavsleden by the Oslo Pilgrim Centre, but didn't take them up on that, and collected a passport when I started. I have done that both times I have walked one of the St Olav's Way pilgrimage routes. See https://pilegrimsleden.no/en/about/pilegrimspasset-og-olavsbrevet for places that can issue the passport. Contact the pilgrims centre in Olso or the National Pilgrim Centre in Trondheim. They may help.
You can get one quite easily via Ivar's forum or when you get to Oslo. I walked this way in 2008 and carried a tent. In my experience there were very few places to have the credencial stamped (only 2 in fact) and we walked all the way from Oslo to Trondheim. We met only 1 other pilgrim during the walk and 4 at the end in Trondheim so expect a solitary walk. We were able to receive our certificates without the "proof" of a credential. they proabbaly just looked at our dishevelled state. a month of walking with very few showers.
In 2012 I found places to have my passport stamped pretty much every day on the Gudbrandsdalen. Many of these were places where I stayed, but there were others. This year on the S:t Olavsleden, there was no problem finding places to stamp. After someone who didn't have a stamp offered to do a drawing in my passport, I collected three more drawings and a total of 53 entries in my passport from the S:t Olavsleden.