import { Callout } from "zudoku/ui/Callout";

# Licensing & tiers

ALbuild follows a simple, transparent model: **the complete build toolchain is free of license**, and you pay only when you need the premium **deployment** features.

---

## Free of license

The entire build, compile, test, sign and packaging toolchain is **free**: no license key, no trial clock, no per-run charge.

Included:

- **All build tasks / cmdlets**: Get BC Artifact, Create BC Container / Container User, Remove BC Container, Resolve Dependencies (NuGet, Universal Packages and local `.app` files), Get Universal Package, Import Configuration Package, Install 365 business development app(s), Install Test Toolkit, Compile App, Sign App, Publish &amp; Install App, Run Tests, Publish Testiny Results, Stamp Build Version, and Check Translations.
- **Publish NuGet Package** to Azure Artifacts or any NuGet v3 feed.
- **All ALbuild V1 legacy tasks**, for backward compatibility.
- The **local pipeline runner** ([`Invoke-ALbuildPipeline`](../powershell-module/pipeline)).
- The [pipeline templates](https://github.com/365businessdev/ALbuild/tree/main/templates).
- Standard support through the [365 business development Service Desk](http://servicedesk.365businessdev.com/).

---

## Licensed features

The following **deployment** features require a subscription. A **free trial** is available so you can evaluate them before subscribing.

Enforcement is grouped into **five licensed feature areas**. Every cmdlet below calls
`Assert-ALbuildLicensed` on entry with the feature named in the first column.

| Feature area | Task | Cmdlets |
| --- | --- | --- |
| **OnPrem** — deployment to on-premise and per-tenant targets | `PublishPerTenantExtension@0`, `PublishOnPremApp@0`, `PublishDevExtension@0` | [`Publish-BcPerTenantExtension`](../powershell-module/onprem#publish-bcpertenantextension), [`Publish-BcOnPremApp`](../powershell-module/onprem#publish-bconpremapp), [`Publish-BcOnPremContainerApp`](../powershell-module/onprem#publish-bconpremcontainerapp), [`Publish-BcDevExtension`](../powershell-module/onprem#publish-bcdevextension), [`Install-BcOnPremApp`](../powershell-module/onprem#install-bconpremapp), [`Sync-BcOnPremApp`](../powershell-module/onprem#sync-bconpremapp), [`Start-BcOnPremUpgrade`](../powershell-module/onprem#start-bconpremupgrade) |
| **Marketplace** — AppSource submission | `SubmitMarketplace@0` | [`Submit-BcMarketplaceApp`](../powershell-module/marketplace#submit-bcmarketplaceapp) |
| **RuntimePackages** — building and publishing runtime packages | `BuildRuntimePackages@0` | [`Build-BcRuntimePackages`](../powershell-module/runtime-packages#build-bcruntimepackages), [`Invoke-BcRuntimeFactory`](../powershell-module/runtime-packages#invoke-bcruntimefactory), [`Publish-BcRuntimePackage`](../powershell-module/runtime-packages#publish-bcruntimepackage) |
| **Environments** — demo/dev environment provisioning | | [`New-BcEnvironment`](../powershell-module/environments#new-bcenvironment), [`Remove-BcEnvironment`](../powershell-module/environments#remove-bcenvironment), [`Remove-BcExpiredEnvironment`](../powershell-module/environments#remove-bcexpiredenvironment) |
| **Validation** — AppSource validation | | [`Invoke-BcValidation`](../powershell-module/apps#invoke-bcvalidation) |

<Callout type="note" title="Compiling and testing stay free">
Note where the line falls: building, compiling, signing and running tests are free, including for an
AppSource app. Only the **AppSource validation run** ([`Invoke-BcValidation`](../powershell-module/apps#invoke-bcvalidation))
and the **submission** are licensed.
</Callout>

<Callout type="info" title="How enforcement works">
The license check runs **only on entry** to a licensed cmdlet/task, via `Assert-ALbuildLicensed`. If no valid license is found, the operation fails with clear remediation guidance. Free-of-license operations never perform a license check. For the Azure DevOps extension, licensing is verified automatically **per Azure DevOps organization**: there is nothing to configure in your pipelines.
</Callout>

You can check the current state programmatically with [`Test-ALbuildLicense`](../powershell-module/core#test-albuildlicense) and assert it with [`Assert-ALbuildLicensed`](../powershell-module/core#assert-albuildlicensed).

### The trial starts itself

You do not request a trial. The first time a licensed feature runs in an Azure DevOps organization
that has no registration yet, ALbuild **registers a 30-day trial automatically** and then re-verifies,
so the run proceeds. Licenses are keyed to the Azure DevOps collection, so the trial belongs to the
organization, not to a user or a pipeline.

When the trial expires the service still answers "ok", with a past end date, and
`Assert-ALbuildLicensed` is what turns that into a clear failure.

### When the licensing service is unreachable

Two mechanisms keep a build from failing because of a network problem:

- **Grace window.** A previously verified license keeps working for `LicenseGraceDays` days
  (default **14**) while the service cannot be reached. This applies only to *network* failures. An
  explicit invalid or expired answer from the service is never graced. Set the window with
  [`Set-ALbuildConfig`](../powershell-module/core#set-albuildconfig); `0` disables the grace cache.
- **Offline key.** For a trusted agent that can never reach the service, for example a self-hosted
  agent inside a locked-down customer network, set **`ALBUILD_LICENSE_KEY`** as a secret variable on
  that agent. Its presence authorises the licensed features without contacting the service at all.

---

## Plans (Azure DevOps extension)

All plans include every free-of-license task plus the full set of licensed deployment tasks, the pipeline templates, and standard support.

| Plan | Price | Best for | Scope |
| --- | --- | --- | --- |
| **Per Pipeline Run** | **1.00 € / run** | Individuals or small teams needing occasional access | Pay-as-you-go; charged per pipeline run |
| **Per 5 Repositories** | **30.00 € / month** | Teams managing a handful of repositories | Up to 5 Azure DevOps repositories; unlimited runs |
| **Per DevOps Project** | **200.00 € / month** | Larger projects spanning many repositories | All repositories in one project; unlimited runs |
| **Per DevOps Organization** | **400.00 € / month** | Organizations running multiple projects | All repositories and projects in one organization; unlimited runs |

> **Need more than 5 repositories?** Combine multiple *Per 5 Repositories* subscriptions, or move up to the *Per DevOps Project* or *Per DevOps Organization* plan for unlimited repositories.

To get started, visit [365businessdev.com](https://365businessdev.com).
