Cannot sign Azure Marketplace VM image licence through API

Rokas 1 Reputation point
2020-07-27T09:15:28.403+00:00

Hello, I'm using Golang SDK to create a VM resource from third party Azure Marketplace image.

At first an error came up that Licence Agreement is not signed. But after creating and using MarketplaceAgreementClient.Sign method I'm getting the following:

marketplaceordering.MarketplaceAgreementsClient#Sign: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="You must accept the legal terms through the Azure portal (http://go.microsoft.com/fwlink/?LinkId=534873). Correlation Id: '305cfcff-c231-4fa7-9e5f-c77cde28fd11'. 

My goal is to be able to sign the agreement through API, without going to Azure Portal UI.
Is there a way to do this? If not - why marketplaceordering.MarketplaceAgreementsClient is available in GoLang SDK?

Thanks, Rokas

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,130 questions
{count} votes