Can one insulate outside with polyurethane?

Polyurethane foam is commonly used to insulate buildings from the outside where the foam is in contact with the adjacent soil.

For example, it can be installed on the outer face of foundation walls or under a concrete floor, where the floor slab is not fulfilling a structural function.