Azure cloudshell error “unexpected status 400 (400 Bad Request) with error: ResourcePurchaseValidationFailed: User failed validation to purchase resources. Error message: ‘You have not accepted the legal terms on this subscription”
unexpected status 400 (400 Bad Request) with error: ResourcePurchaseValidationFailed: User failed validation to purchase resources. Error message: 'You have not accepted the legal terms on this subscription
Resolving the “ResourcePurchaseValidationFailed” Error in Azure
Overview
During resource deployment in Azure, you may encounter the following error message:
This error typically occurs when the Azure subscription has not yet accepted the legal terms associated with a Marketplace image—for example, when deploying a virtual machine (VM) image such as the Zscaler Cloud Connector or any other third-party Marketplace offering.
Azure requires you to explicitly accept the publisher’s legal terms before you can deploy or purchase the corresponding Marketplace resource under your subscription.
Cause
Each Marketplace image in Azure is governed by specific legal terms defined by the publisher.
When you attempt to deploy a resource using an image whose terms have not yet been accepted, Azure blocks the operation for compliance reasons, resulting in the ResourcePurchaseValidationFailed error.
Resolution
To resolve this issue, you must accept the legal terms for the image before proceeding with deployment.
You can do this through the Azure Portal, Azure CLI, or PowerShell.
Option 1: Using Azure CLI
Run the following command to accept the Marketplace image terms:
Replace the placeholders with the appropriate values for your image.
For example, to accept terms for the Zscaler Cloud Connector image:
Once the terms have been accepted, retry your deployment.
Verification
To verify that the terms were successfully accepted, run:
If accepted, the output will confirm that the
property is set to
.
Summary
If you encounter the
error with the message “You have not accepted the legal terms on this subscription”, it means the Marketplace image terms must be accepted for your subscription. Accepting these terms—using either the Azure CLI, PowerShell, or Portal—resolves the issue and allows the deployment to proceed successfully.



