Short answer. It depends on the agent's good faith. Under Article 1917, in the situation the preceding article covers, if the agent acted in good faith, the principal is liable in damages to the third person whose contract must be rejected. But if the agent acted in bad faith, he alone is responsible — the principal is off the hook.
What the law says
if the agent has acted in good faith, the principal shall be liable in damages to the third person whose contract must be rejected. If the agent acted in bad faith, he alone shall be responsible.
Civil Code, Article 1917 — Liability When a Contract Is Rejected. Read the full provision →
When a contract has to be rejected
Sometimes an agent, exceeding his authority, contracts with a third person in a way that cannot stand as against the principal — the preceding article deals with the situation where two people have dealt with such an agent and one of the contracts must be rejected. Article 1917 answers who then compensates the third person left with the rejected contract, and it turns entirely on the agent's good or bad faith. If the agent has acted in good faith, the principal shall be liable in damages to the third person whose contract must be rejected. If the agent acted in bad faith, he alone shall be responsible.
Agent in good faith: the principal pays
If the agent acted in good faith — honestly believing he had the authority he purported to exercise — the principal is the one liable in damages to the disappointed third person. This may seem hard on the principal, whose agent, after all, overstepped. But there is sense in it. The principal chose and empowered the agent and set him loose to deal with third parties; an outsider who dealt in good faith with an agent who himself acted in good faith should not carry the loss of the agent's honest over-reach.
Agent in bad faith: he alone answers
If instead the agent acted in bad faith — knowing he lacked authority, or otherwise acting dishonestly — the result flips: he alone shall be responsible. The principal is not liable to the third person at all; the agent bears the whole of the damages himself. This is equally sensible. Where the agent knowingly exceeded his authority or deceived the third person, the wrong is the agent's own, and the principal — who did not authorise it — should not be made to pay for his agent's dishonesty. So the third person's remedy in that case runs solely against the agent.
If your contract was rejected
If you dealt with someone's agent and your contract has had to be rejected because the agent exceeded his authority, you are not necessarily without a remedy — this article gives you damages, from one party or the other. The pivotal fact is the agent's good faith. If he acted honestly, you look to the principal; if he acted in bad faith, you look to the agent alone. So the questions to pin down are whether the agent truly exceeded his authority and whether he knew it. Gather what shows how the agent represented his authority and what he knew, because that evidence decides who owes you the damages.