Azure Marketplace API to programmatically review and accept publisher agreement/EULA

Video Walkthrough

GET request to retrieve agreement information

curl -X GET \ 'https://management.azure.com/subscriptions/{{subscription_id}}/providers/Microsoft.MarketplaceOrdering/offertypes/virtualmachine/publishers/{{publisher}}/offers/{{offer}}/plans/{{sku}}/agreements/current?api-version=2015-06-01' \ -H 'authorization: Bearer {{access_token}}' \
{
"id": "/subscriptions/{{subscription_id}}/providers/Microsoft.MarketplaceOrdering/offertypes/{{publisher}}/offers/{{offer}}/plans/{{sku}}",
"name": "{{sku}}",
"type": "Microsoft.MarketplaceOrdering/offertypes",
"properties": {
"publisher": "{{publisher}}",
"product": "{{offer}}",
"plan": "{{sku}}",
"licenseTextLink": "https://106c4.wpc.azureedge.net/80106C4/Gallery-Prod/cdn/2015-02-24/prod20161101-microsoft-windowsazure-gallery/offer-specific-legal-terms.txt",
"privacyPolicyLink": "{{publisher's privacy policy page URL}}",
"retrieveDatetime": "2017-10-02T19:51:05.2843331Z",
"signature": "XXXXXXXXXXXYK43BUSJDPLSYHID7SSQUUFNTSFK72VR5PSOQSWVHKD4BFPETFKGVB7SKXRZKK5R4ADNQ2Z2A",
"accepted": false
}
}

PUT request to update accepted flag

curl -X PUT \
'https://management.azure.com/subscriptions/{{subscription_id}}/providers/Microsoft.MarketplaceOrdering/offertypes/virtualmachine/publishers/{{publisher}}/offers/{{offer}}/plans/{{sku}}/agreements/current?api-version=2015-06-01' \
-H 'authorization: Bearer {{access_token}}' \
-H 'content-type: application/json' \
-d '{
"id": "/subscriptions/{{subscription_id}}/providers/Microsoft.MarketplaceOrdering/offertypes/{{publisher}}/offers/{{offer}}/plans/{{sku}}",
"name": "{{sku}}",
"type": "Microsoft.MarketplaceOrdering/offertypes",
"properties": {
"publisher": "{{publisher}}",
"product": "{{offer}}",
"plan": "{{sku}}",
"licenseTextLink": "https://106c4.wpc.azureedge.net/80106C4/Gallery-Prod/cdn/2015-02-24/prod20161101-microsoft-windowsazure-gallery/offer-specific-legal-terms.txt",
"privacyPolicyLink": "{{publisher'sp privacy policy page URL}}",
"retrieveDatetime": "2017-10-02T19:51:05.2843331Z",
"signature": "XXXXXXXXXXXYK43BUSJDPLSYHID7SSQUUFNTSFK72VR5PSOQSWVHKD4BFPETFKGVB7SKXRZKK5R4ADNQ2Z2A",
"accepted": true
}
}'

--

--

--

Principal Engineer / Architect, FastTrack for Azure at Microsoft

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Meet the Team: Brit Hemming

Route to OpenShift deployment

Roll20 Macros Crash Course Part 3

5 reasons why every child should learn code

5 Ways to Find the Shortest Path in a Graph

Micro Frontend — Front End approach for building scalable applications

How to successfully download Udemy courses with udemy-dl

Top 6 Popular Technologies for Enterprise App Development

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arsen Vladimirskiy

Arsen Vladimirskiy

Principal Engineer / Architect, FastTrack for Azure at Microsoft

More from Medium

Azure CosmosDB Key Rotation: Monitoring and Alerts

Improve performance & scalability of Azure Cosmos DB SQL API

Automate your patching using Azure Arc and Azure Automation!

How to Azure — Introduction-1