In an action, inter alia, to recover damages for breach of contract, the third-party defendant appeals from an order of the Supreme Court, Nassau County (Roncallo, J.), dated August 27, 1991, which denied his motion to dismiss the third-party complaint seeking contractual indemnification for failure to state a cause of action.
Ordered that the order is reversed, on the law, with costs, the motion is granted, and the third-party complaint is dismissed.
*301The third-party defendant is a former owner of the property in question. When he owned the property, the Zoning Board of Appeals of the Incorporated Village of Hewlett Bay granted him a side-yard variance on condition that he hold certain municipalities harmless for damages caused by them during the exercise of their easement rights to maintain drains under the surface of the property. The Zoning Board was without authority to require, as a condition of granting a side-yard variance, that the third-party defendant enter into such an agreement, since that condition was not related to the subject of the variance application (see, St Onge v Donovan, 71 NY2d 507, 516). Moreover, on this record, the third-party complaint, as amended, fails to state a viable cause of action for indemnification pursuant to that agreement (see, CPLR 3211 [a] [7]; Hooper Assocs. v AGS Computers, 74 NY2d 487, 491). Accordingly, the third-party complaint is dismissed. Rosenblatt, J. P., Miller, Lawrence and Pizzuto, JJ., concur.