Stackbit users have the option to deploy their Jamstack sites to Microsoft Azure. We have partnered with Microsoft to leverage their Static Web Apps service, so those with Azure accounts can easily integrate and deploy their sites seamlessly.

If you want to deploy your new site to Azure but don’t have an account yet, sign up for one before proceeding.

There are two different paths available to users wishing to deploy to Azure:

  1. Add your Azure Active Directory Tenant ID to your Stackbit account.
  2. Use Stackbit’s Azure Marketplace app to create a new Azure Managed Resource Group. You’ll enter your Tenant ID and Managed Resource Group on Stackbit when creating your site.

Both paths will allow Stackbit to manage resources on your Azure account, and we will explain the difference between them in this document.

Option 1: Add Your Azure Tenant ID to Your Stackbit Account

Azure provides a way to authenticate into a user’s account and allow external services to manage and create new resources. Stackbit uses this approach with GitHub’s service, for example. Our platform can create new GitHub repositories on your behalf in your account and connect them to your private repositories. Another example is Netlify, where once you claim your account when building sites via Stackbit, the platform can automatically manage the services that deploy your site on their platform.

On Azure, this is called your Active Directory Tenant ID, (AD Tenant ID).

That is the preferred method of authentication if you are working on your own, as a part of a small team, or do not have an organizational resource management policy to follow. It will allow Stackbit to create new Resource Groups for Static Web Apps on Azure on your behalf. You don’t have to worry about overprovisioning. We abide by the policy limits of Azure, the same way that we do for services like Contentful. We will alert you when you are at capacity and prevent you from creating more sites than your Azure plan allows.

Find Your Tenant ID

To find the Azure AD Tenant ID for your account, log into Azure

Microsoft Azure Active all services menu

From here, select the Azure Active Directory, which has a little blue pyramid icon (second row, second from the left). That will drop you into your Default Directory Overview

Azure Default Directory menu

Under the “Tenant information” card, you will find your Tenant ID. Click on the blue copy icon to copy this ID to your clipboard.

Create a New Site on Stackbit

Now, create a new site on Stackbit using the following link:

Once on the Stackbit Site Builder page, select your theme, static site generator, and headless CMS as you usually would. In the Azure card, paste the Tenant ID you found in the previous steps and hit ‘Connect.’

Stackbit Site Builder showing Azure Tenant ID card

That will bring you to an authentication page from Microsoft. Accept the terms, and it will redirect you back to the Site Builder.

For the last step, hit the ‘Create Site’ button, and in a few moments, your site will be ready to edit in the Studio and deployed on Azure. Under the hood, Stackbit will provision the needed Static Web Apps Resource Group and configure it to deploy your new Jamstack site.

When you publish your site or page in Stackbit Studio, it will deploy it on Azure in your newly -created resource group.

Stackbit will store this Tenant ID, which means the next time you create a site using you will not need to add it, and the platform can simply deploy the new resources automatically.

Option 2: Use the Stackbit Azure Marketplace App

Azure provides a way to authenticate into a specific Resource Group generated by a user. This route allows external services to connect and trigger actions inside the resource but not create or manage other resources.

That is the preferred method for developers who want more control over their resource usage, enterprise customers with organizational resource management policies, and agencies managing multiple applications across multiple Azure accounts.

The Stackbit Azure Marketplace App

To make it easy to create a new Azure Managed Resource Group for Static Web Apps, we have created the Stackbit Azure Marketplace App. Users can find this by searching for ‘Stackbit’ in the Azure Marketplace, which can be found through their portal site. You can also get to the app directly by clicking here

The Stackbit Azure Marketplace App

After pressing “Create,” you need to select or create a resource group and define the application name,

The Stackbit Azure Marketplace App Basics

then agree to the terms and press “Create.”

The Stackbit Azure Marketplace App Review And Create

After the application is ready, go to the resource to check it out.

The Stackbit Azure Marketplace App Post Deploy

On the created Managed Application page you can find information about the Stackbit application. In the Resource group, a single static index.html placeholder page was deployed. It contains some useful information about Stackbit. At the top of the page, you will find your Managed Resource Group ID. You’ll need it for the next step.

The Stackbit Azure Installed Managed Application Page

Visit the Stackbit Site Builder to create a new site.

After selecting your theme, static site generator, and headless CMS, you will need to paste your Tenant ID and Managed Resource Group ID into the Azure card. The Tenant ID is needed to verify that the user has access to the relevant resource group.

The Stackbit Summary Page Azure Deployment Target

When you hit “Create Site,” it will deploy your new site to your specified Manages Resource Group.

When you publish your content changes in Stackbit Studio, it will deploy on your Azure website. Congratulations!

If you run into issues or unexpected behavior, please let us know and we’ll be happy to help.