Always, wondered this, and never found a good answer. Guess the opposite applies, too -- how do you know someone does NOT have the right to enter a legal agreement on behalf of a company?
Please cite sources: US Federal Law and/or Case Law
You don't know, though sometimes you can do research to gain comfort.
In practical terms, one relies on:
Disclaimer: This post does not constitute legal advice and does not establish an attorney-client relationship.