For AppSource apps, if you want to enable KeyVault access for your app (as described here https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-app-key-vault-overview) you can add the access to this keyvault in your local development environment or your pipelines (for running tests) by adding 3 secrets to either the GitHub repo or your KeyVault. Based on this walkthrough https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/setup-app-key-vault-onprem you will need to create 3 secrets:
- A KeyVaultClientId, which is the Client ID for the AAD App with access to the KeyVault.
- A KeyVaultCertificateUrl, pointing to a certificate which gives you access to the AAD App.
- A KeyVaultCertificatePassword, which is the password for this certificate.
In the case of KeyVault access for apps, it is not enough to just add the secrets, you will also have to add information in the .AL-Go\settings.json that this app uses this KeyVault. Add these three settings
"KeyVaultCertificateUrlSecretName": "KeyVaultCertificateUrl",
"KeyVaultCertificatePasswordSecretName": "KeyVaultCertificatePassword",
"KeyVaultClientIdSecretName": "KeyVaultClientId",
With this, containers set up for build pipelines or development environments will have access to this keyvault.