Stage an Outlook add-in on Microsoft Azure with Visual Studio
This article describes how to deploy an Outlook add-in web app to Azure and sideload the add-in for testing in an Outlook client application.
Important
The process described in this article applies only to Outlook add-ins. For instructions about staging add-ins for other Office applications on Azure, see Stage an Office Add-in on Microsoft Azure with Visual Studio.
Prerequisites
Install Visual Studio 2022 and choose to include the Azure development workload.
Note
If you've previously installed Visual Studio 2022, use the Visual Studio Installer to ensure that the Azure development workload is installed.
Install Office.
Note
If you don't already have Office, you can register for a free 1-month trial.
Obtain an Azure subscription.
Note
If don't already have an Azure subscription, you can get one as part of your Visual Studio subscription or register for a free trial.
Step 1: Create an Outlook add-in in Visual Studio
Start Visual Studio as an administrator.
Choose Create a new project.
Using the search box, enter add-in.
Choose Outlook Web Add-in as the project type, and then choose Next to accept the default settings.
Visual Studio creates a basic Outlook add-in that you'll be able to publish as-is, without making any changes to its web project.
Step 2: Publish your Outlook add-in web app to Azure
With your add-in project open in Visual Studio, right-click (or select and hold) the web project and then choose Publish.
Follow the instructions at Publish your web app. Skip the article sections that precede Publish your web app, but be sure that the Visual Studio button is selected at the top of the page.
Visual Studio publishes the web project for your Outlook add-in to your Azure web app. When Visual Studio finishes publishing the web project, your browser opens and shows a webpage with the text "Your web app is running and waiting for your content." This is the current default page for the web app.
Copy the root URL (for example:
https://YourDomain.azurewebsites.net
); you'll need it when you edit the add-in manifest file later in this article.
Step 3: Edit and deploy the add-in manifest file
In Visual Studio with the sample Outlook add-in open in Solution Explorer, expand the solution so that both projects show.
Expand the Outlook add-in project (for example, OutlookWebAddIn), right-click (or select and hold) the manifest folder, and then choose Open. The add-in manifest file opens.
In the manifest file, find and replace all instances of "~remoteAppUrl" with the root URL of the add-in web app on Azure. This is the URL that you copied earlier after you published the add-in web app to Azure; for example,
https://YourDomain.azurewebsites.net
.
Step 4: Sideload the manifest to Outlook
Follow the guidance at Sideload an Outlook add-in that uses an add-in only manifest to sideload the add-in.