Best ways to safely go through someone's phone?

I’m asking about respectful and legitimate ways to access a phone. What are the best practices for safely and ethically going through someone’s phone, assuming one has consent or legal authority to do so?