Azure_Credentials
Connect your GitHub repository to Azure resources including Azure KeyVault for secret management and app signing.Overview
By creating a secret calledAzure_Credentials, you give your GitHub repository access to:
- Azure KeyVault for reading secrets
- Managed signing of apps (requires Premium SKU KeyVault)
- Azure resources for deployment and storage
For signing apps with KeyVault, you need a Premium SKU KeyVault. Update an existing KeyVault:
KeyVault Security Models
Azure KeyVault supports two security models:Role Based Access Control (RBAC) - Recommended
| Task | Required Role |
|---|---|
| Read Secrets | Key Vault Secrets User |
| Sign Apps | Key Vault Crypto User + Key Vault Certificate User |
Vault Access Policy
| Task | Required Permissions |
|---|---|
| Read Secrets | Secret permissions: Get, List |
| Sign Apps | Cryptographic Operations: Sign + Certificate permissions: Get |
Authentication Methods
You can authenticate using either a Managed Identity or an App Registration.Managed Identity with Federated Credential
Register your GitHub repository in the managed identity under Settings → Federated credentials. Example:App Registration with Federated Credential
Register your GitHub repository in the app registration under Certificates & Secrets → Federated credentials. Example:App Registration with Client Secret
Create a client secret in the app registration under Certificates & Secrets. Example:App Signing Configuration
WithAzure_Credentials configured, you can enable app signing by setting:
AuthContext
Deploy apps to Business Central environments.Overview
Whenever AL-Go deploys to an environment, it needs an AuthContext secret. The secret can be provided:- Underneath the environment in GitHub (preferred)
- As a repository secret named
<EnvironmentName>_AuthContext - As a generic
AuthContextrepository secret
Managed Identity
Impersonation with RefreshToken
Allows AL-Go to impersonate a user and act on their behalf. Example:RefreshTokens typically provide access for 90 days. After that, you need to refresh the AuthContext secret with a new refreshToken.
App Registration (Service to Service)
Register the ClientId in Business Central to create a user with permissions: D365 AUTOMATION and EXTEN. MGT. - ADMIN.With Federated Credential
Register your GitHub repository in the app registration. Example:With Client Secret
Create a client secret in the app registration. Example:AppSourceContext
Deliver apps to Microsoft AppSource.Overview
Adding a secret calledAppSourceContext to an AL-Go repository from the AppSource template enables automatic delivery to AppSource.
Managed identities cannot be used for AppSource submission as the Partner Center API is not an Azure resource.
App Registration (Service to Service)
Register the ClientId in Partner Center.With Federated Credential
Example:With Client Secret
Example:StorageContext
Deliver build artifacts to Azure Storage.Overview
Adding a secret calledStorageContext enables automatic delivery to an Azure Storage account.
Structure
The StorageContext secret must be a compressed JSON structure containing authentication properties plus:- containerName - Container name (with placeholders)
- blobName - Blob name (with placeholders)
- storageAccountName - Azure Storage account name
Placeholders
{project}- Project or repository name{version}- Version number (plus -preview for continuous delivery){branch}- Branch name{type}- apps, testapps, or dependencies
Container names must be 3-63 characters long, start/end with lowercase letter or number, and contain only lowercase letters, numbers, or dashes (no consecutive dashes).
Authentication Methods
Managed Identity with Federated Credential
Register your GitHub repository in the managed identity. Example:App Registration with Federated Credential
Example:App Registration with Client Secret
Example:Storage Account with SAS Token
Example:Storage Account with Access Key
Example:GitHubPackagesContext
Deliver apps to GitHub Packages NuGet feed.Overview
Creating a secret calledGitHubPackagesContext enables:
- Automatic delivery to GitHub Packages after every successful build
- Automatic dependency resolution from the NuGet feed
GitHub App authentication doesn’t support GitHub Packages. The token must be a Personal Access Token (Classic or Fine-Grained).
NuGetContext
Deliver apps to NuGet feeds (Azure DevOps or other).Overview
Creating a secret calledNuGetContext enables automatic delivery to a NuGet feed after every successful build.
AL-Go will NOT use this feed for dependency resolution automatically. Add it to
trustedNuGetFeeds setting if you want to use it for dependencies.GhTokenWorkflow
Update AL-Go System Files.Overview
When running the “Update AL-Go System Files” workflow, you need a secret calledGhTokenWorkflow containing a Personal Access Token with permissions to modify workflows.
Required permissions:
workflow- Modify GitHub Actions workflowscontents- Commit changes to the repository
GitSubmodulesToken
Access private Git submodules.Overview
When using Git submodules from private repositories, create aGitSubmodulesToken secret containing a Personal Access Token with read access to those repositories.
Alternative:
Set the gitSubmodulesTokenSecretName setting to use a different secret name (e.g., GhTokenWorkflow).
Required permissions:
repo- Full control of private repositories (for reading submodules)
LicenseFileUrl
Use a specific license file during CI/CD.Overview
AL-Go uses the Demo license from Business Central (CRONUS license) by default. To use a different license, create aLicenseFileUrl secret.
Value: Direct download URL for the license file
Example:
Required for building AppSource apps for Business Central versions prior to version 22.
Additional Secrets
These secrets are referenced in settings but work similarly to the ones above:AdminCenterApiCredentials
Credentials for connecting to the Admin Center API when creating Online Development Environments. Customize name:ApplicationInsightsConnectionString
Application Insights connection string for the apps. Customize name:Code Signing Certificates (Legacy)
Legacy method for code signing (new method preferred). CodeSignCertificateUrl: URL to download .pfx certificate fileCodeSignCertificatePassword: Password for the certificate Customize names:
Testing Secrets
After creating secrets, verify they work correctly:Related Topics
- Secrets Overview - General information about secrets
- Azure KeyVault - Using Azure KeyVault for secrets
- Basic Repository Settings - Settings for customizing secret names