Skip to main content

Quickstart Microsoft commercial marketplace

On this page you will integrate your web application with Microsoft commercial marketplace. This allows you to list a transactional SaaS offer on either Azure Marketplace or Microsoft AppSource in no-time.

The content of this quickstart

  1. Firstly, we'll create an app and generate secrets in Microsoft Azure portal to give Nblocks access to the integration.
  2. Secondly, we'll create a new marketplace offer in Microsoft partner center and add the Nblocks landing page and connection webhook.
  3. Last but not least, we'll test the integration by purchasing the offer.
  1. If you haven't already, sign up for Nblocks and get access to your app id
  2. Completed the Quickstart since we'll arriving as a new and logged in user to your app.
  3. You need to sign up and get access to Microsoft Azure and have an Azure AD tenant.
  4. To be able to list offers on Microsoft commercial marketplace you need to become a partner and get access to Microsoft Partner Center.

Generate apps and secrets in Microsoft Azure portal

Step 1. Create a new app registration for the marketplace integration

Go to Azure portal and login.

Click "Azure Active Directory".

Click "App registrations". Apps

Click "New registration".

Name the new app to anything you want, select "Single tenant" as the supported account type and click "Register".

Create app

In the new app, click "Certificates & Secrets".

Click "New client secret" and select a suitable expiration time.

Create secret

What expiration time to use?

We recommend at least 6 months so that you don't need to recreate this secrets and sync them with Nblocks all to often.

Save this new secret value for a couple of minutes before we store it in Nblocks. Also save the "Application (client) ID and "Directory (tenant) ID" which is available to copy from the "Overview" tab.

Step 2. Create new app registrations for Azure AD SSO Login

Why two app registrations?

A requirement for listing offers in the commercial marketplace is that your customers should be able to login with Azure AD for a seamless experience.

Microsoft recommends developers to register separate applications for the marketplace integration and Azure AD SSO. This helps separate logic of user logins and subscription management and is better from a security standpoint.

Click "Azure Active Directory" -> "App registrations" -> "New registration" once again.

Name the new app to anything you want but remember that users will see this name when they login with Microsoft. Select "Multitenant" as the supported account type. Under "Redirect URI" select "Web" and add the URI and click "Register".

Create app

Again, click "Certificates & Secrets" -> "New client secret" and generate a secret for this app aswell.

Step 3. Store the Azure app secrets in Nblocks

The secrets for both the marketplace integration app aswell as the Azure AD SSO app should now be saved in Nblocks.

You should provide Client ID, Client secret and Tenant ID for both the marketplace integration and Azure AD SSO apps.

Example code

Copy the below cURL code and paste it into your terminal fr om anywhere.

You'll need to add your own app api key to the x-api-key header.

curl --request PUT '' \
--header 'x-api-key: YOUR_APP_API_KEY' \
--data-raw '{
"microsoftAzureADClientId": "XXXXXXX",
"microsoftAzureADClientSecret": "XXXXXXX",
"microsoftAzureADTenantId": "XXXXXXX",
"microsoftAzureMarketplaceClientId": "XXXXXXX",
"microsoftAzureMarketplaceClientSecret": "XXXXXXX",
"microsoftAzureMarketplaceTenantId": "XXXXXXX"

Curious in what more ways you can use the /credentials endpoint? See the API reference

That's all, now we will go ahead to the marketplace offer listing.

Create a new marketplace offer

Go to Microsoft partner center and login.

Click "Marketplace offers".

Click "New offer", select "Software as a Service" and name your offer to anything you want.

Create offer

In your new offer, click "Technical configuration".

  • In "Landing page URL", add your unique landing page url which is
  • In "Connection webhook" add your unique webhook url which is
  • In "Azure Active Directory tenant ID" add your marketplace integration app tenant id.
  • In "Azure Active Directory application ID" add your marketplace integration app client id.

You'll find your app id here Technical configuration

That's all that's needed to be done for the integration!

Test with a purchase

Before we can publish a draft and test the new offer you need to provide enough information like listing details, categorizing, different plans etc. This process, about what is required, is well guided by microsoft.

Once that is done we can submit it for review and preview it. You'll then get a link to a preview version and test buying it.

You should see the listing, be able to purchase it, get to the Nblocks Landing page and then arrive as a new customer and logged in into your app.