Resolve 'Legal terms have not been accepted' Error in Azure Marketplace Deployment

User Failed Validation to Purchase Resources

Question

You recently created a new Azure subscription that contains a user named Admin1.

Admin1 attempts to deploy an Azure Marketplace resource by using an Azure Resource Manager template. Admin1 deploys the template by using Azure

PowerShell and receives the following error message: User failed validation to purchase resources. Error message: Legal terms have not been accepted for this item on this subscription. To accept legal terms, please go to the Azure portal (http://go.microsoft.com/fwlink/?LinkId=534873) and configure programmatic deployment for the Marketplace item or create it there for the first time.

You need to ensure that Admin1 can deploy the Marketplace resource successfully.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C

https://docs.microsoft.com/en-us/powershell/module/az.marketplaceordering/set-azmarketplaceterms?view=azps-4.1.0

The error message suggests that the user Admin1 needs to accept the legal terms for the Marketplace item before deploying it programmatically. Therefore, to resolve the issue and allow Admin1 to deploy the Marketplace resource successfully, we need to perform the following steps:

Step 1: Register the Microsoft.Marketplace resource provider To use a Marketplace item in Azure, we need to register the corresponding resource provider first. In this case, we need to register the Microsoft.Marketplace resource provider by following these steps:

  1. Login to the Azure portal (https://portal.azure.com).
  2. Click on "Subscriptions" in the left navigation pane and select the subscription containing the Marketplace item.
  3. In the subscription blade, click on "Resource providers" and search for "Microsoft.Marketplace" in the search bar.
  4. If the resource provider is not registered, click on the Register button and wait for the registration process to complete.

Step 2: Accept the legal terms for the Marketplace item Once the Microsoft.Marketplace resource provider is registered, we can now accept the legal terms for the Marketplace item. To do this, we need to follow these steps:

  1. Login to the Azure portal (https://portal.azure.com).
  2. Search for the Marketplace item in the search bar and click on it.
  3. In the Marketplace item blade, click on the "Get it now" button.
  4. In the "Basics" tab of the deployment blade, select the subscription and resource group where you want to deploy the item.
  5. In the "Legal terms" tab, read and accept the terms by clicking on the "I agree" checkbox.
  6. Click on the "Purchase" button to start the deployment process.

Step 3: Deploy the Marketplace item using Azure PowerShell Now that the legal terms have been accepted for the Marketplace item, Admin1 can deploy it programmatically using Azure PowerShell. The deployment command should include the necessary parameters for the Marketplace item, such as the SKU and version.

So, the correct answer to the exam question is option C. From Azure PowerShell, run the Set-AzMarketplaceTerms cmdlet. This cmdlet allows us to accept the legal terms for a Marketplace item programmatically, which is what Admin1 needs to do before deploying the item. Option A (Set-AzApiManagementSubscription cmdlet) is not related to the issue at hand, as it is used for managing Azure API Management subscriptions. Option B (registering the Microsoft.Marketplace resource provider) is a necessary step, but it alone won't solve the problem. Option D (assigning the Billing administrator role to Admin1) is also not related to the issue, as it is used for managing billing for the subscription, not for deploying Marketplace items.