In most cases, it is legal to acquire someone's emergency contact details since this serves as a safety measure as these may be part of any workplace or school policy.