In order to tame one, you need to feed the baby ambergris.

Something I found out today is that ambergris can be stored in fridges on official.

More Magmasaur Taming & KO Tips