Low slope residential roof

I have a low slope residential roof and virtually all the ceilings underneath are cathedral. Some parts are fully filled with fiberglass batts and parts are functionally solid. I am nearing time to get a new roof and wondered if the spray foam roofs are allowed or recommended for residential roofs? I have torch down roofing on it now.