Deploment of Office Add-ins (MacOS & Web Plugins) on Azure
- Login to Azure Portal and create a new Static Web App.
- Custom domain is optional
- Install Azure
CLI
winget install -e --id Microsoft.AzureCLI --forcePS C:\Users\Marcel\Desktop\npm> winget install -e --id Microsoft.AzureCLI --force Found Microsoft Azure CLI [Microsoft.AzureCLI] Version 2.67.0 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://azcliprod.blob.core.windows.net/msi/azure-cli-2.67.0-x64.msi ██████████████████████████████ 67.8 MB / 67.8 MB Successfully verified installer hash Starting package install... Successfully installed Notes: Winget installs the 64-bit CLI on 64-bit OS by default now. If you have used the 32-bit CLI before, please follow this guide to migrate to 64-bit version: https://learn.microsoft.com/cli/azure/install-azure-cli-windows#migrate-to-64-bit-azure-cli PS C:\Users\Marcel\Desktop\npm> - Install
NodeJS
winget install OpenJS.NodeJS.LTS --forcePS C:\Users\Marcel\Desktop\npm> winget install OpenJS.NodeJS.LTS --force Found Node.js (LTS) [OpenJS.NodeJS.LTS] Version 22.13.1 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://nodejs.org/dist/v22.13.1/node-v22.13.1-x64.msi ██████████████████████████████ 29.4 MB / 29.4 MB Successfully verified installer hash Starting package install... The installer will request to run as administrator, expect a prompt. Successfully installed PS C:\Users\Marcel\Desktop\npm> - Install
Static-Web-Apps-CLI
npm install -g @azure/static-web-apps-cliPS C:\Users\Marcel\Desktop\npm> npm install -g @azure/static-web-apps-cli --force npm warn using --force Recommended protections disabled. npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated sudo-prompt@8.2.5: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. changed 345 packages in 25s 72 packages are looking for funding run `npm fund` for details PS C:\Users\Marcel\Desktop\npm> - Log in to Azure
az login - Select your
TenantandSubscriptionfrom the list provided. The Tenant and Subscription should match the one from the crated Static Web App under point 1.PS C:\Users\Marcel\Desktop\npm> az login Select the account you want to log in with. For more information on login with Azure CLI, see https://go.microsoft.com/fwlink/?linkid=2271136 Retrieving tenants and subscriptions for the selection... [Tenant and subscription selection] No Subscription name Subscription ID Tenant ----- -------------------- ------------------------------------ ----------------------------- [1] Azure subscription 1 73925ac5-0c66-4814-918e-2fe1236a3212 Visibility Blockchain Limited [2] * Subscription 1 2fe1236a-471c-445a-b87b-218a1fd693b7 Visibility Blockchain Limited The default is marked with an *; the default tenant is 'Visibility Blockchain Limited' and subscription is 'Subscription 1' (2fe1236a-471c-445a-b87b-a57f7aaaae3b). Select a subscription and tenant (Type a number or Enter for no changes): Tenant: Visibility Blockchain Limited Subscription: Subscription 1 (2fe1236a-471c-445a-b87b-218a1fd693b7) [Announcements] With the new Azure CLI login experience, you can select the subscription you want to use more easily. Learn more about it and its configuration at https://go.microsoft.com/fwlink/?linkid=2271236 If you encounter any problem, please open an issue at https://aka.ms/azclibug [Warning] The login output has been updated. Please be aware that it no longer displays the full list of available subscriptions by default. PS C:\Users\Marcel\Desktop\npm> - Login to SWA
(static-web-apps)
swa loginPS C:\Users\Marcel\Desktop\npm> swa login Welcome to Azure Static Web Apps CLI (2.0.2) Checking Azure session... (node:8128) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) ✔ Successfully logged into Azure! ✔ Successfully setup project! PS C:\Users\Marcel\Desktop\npm> - Verify
.envfile was created in current folder and create dist folder inside.PS C:\Users\Marcel\Desktop\npm> ls Directory: C:\Users\Marcel\Desktop\npm Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 07/02/2025 11:29 111 .env PS C:\Users\Marcel\Desktop\npm>mkdir dist Directory: C:\Users\Marcel\Desktop\npm Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 07/02/2025 12:12 dist PS C:\Users\Marcel\Desktop\npm> - Retrieve
OfficeAddinsbundle fromhttps://registry2.getvisibility.com/content/artifacts/. - Unpack downloaded bundle into \OfficeAddins\dist folder.
- Create a file staticwebapp.config.json in the \OfficeAddins\dist folder, with the following
content.
{ "navigationFallback": { "rewrite": "/index.html", "exclude": ["*.{css,scss,js,png,gif,ico,jpg,svg}"] } } - Deploy the web app. Open a terminal under in the OfficeAddins directory and execute the following
command:
swa deploy ./dist --env production --app-name {static_web_app_name} --deployment-token {deployment_token} --verbose=silly > deployment-log.txt 2>&1Where:
{static_web_app_name} - is the name of the app created under point 1{deployment_token} - is the deployment token listed in Azure Portal - Create a manifest file. Replace the address localhost:4300 in the files attached below with the address of the static-web-app:
manifest.outlook.xml,manifest.xml. The manifest can be then used to deploy the addins under Office365 Admin Center.