If an agent performs an act that falls within the scope of that agent's authority to represent for the purpose of benefiting the agent's own interests or the interests of a third party, and the other party knew of or could have ascertained that purpose, that act is deemed to be an act performed by a person without authority to represent.
代理人が自己又は第三者の利益を図る目的で代理権の範囲内の行為をした場合において、相手方がその目的を知り、又は知ることができたときは、その行為は、代理権を有しない者がした行為とみなす。
Read this with the articles around it