Environment settings
Most Lattice settings are the same in every environment, but a few depend on the kind of environment: how the license behaves, where a secret can be kept, how the background processes get registered, and what a database copy brings along. This page covers those, so you can settle them for each environment before you verify the setup.
License behavior
Lattice checks its license through the licensing module that ships with Lattice. You enter no key: the environment checks in with the Magicite licensing service when it starts and once a day.
| Environment | While the license needs attention | When the license is not restored |
|---|---|---|
| Production | A warning on the Integration operations workspace, with the date Lattice processing stops. In the last 14 days before that date, users who run a Lattice action also get a warning once per session | From that date, service writes are refused with the error code LicenseNotValid, and the actions that run Lattice processing stop with a message that names the action |
| Any other environment (sandbox, test, development, or one the licensing module cannot classify) | A warning on the workspace: "This environment is not production, so Lattice keeps working, but the license needs attention." | Nothing stops |
When processing is blocked, the setup pages, inquiries, previews and safety actions such as revoke, hold and discard keep working, and the queued work waits instead of failing: "The waiting work runs after the license is restored." The dates are in When Lattice blocks.
How to see the status.
- Open System administration > Workspaces > Integration operations. A status that needs attention shows as a warning in the message bar to anyone who opens the workspace. No warning means the license is valid, or the environment is not production and has no license yet.
- To see the status itself, select License status in the workspace's Links section. The message names the status, for example "Lattice license status: Valid. Nothing is blocked.", and says whether Lattice is blocked now or the date it will be blocked. Anyone who opens the workspace can use it.
- The check-in job's log also records the status: open System administration > Inquiries > Batch jobs, choose Batch job history, select the latest Check in the Lattice license with the licensing service (environment start) and choose Log. It says "Lattice ... checked in with the licensing service. License status: Valid." The job is not on Batch jobs itself once it has ended: the batch framework removes it and keeps only its history.
Act on a warning as in I want to act on a license warning: fix the cause, run System administration > Setup > Magicite > License refresh, and open the workspace again.
Environment type
The licensing module detects the kind of environment by itself. It cannot classify an on-premises environment.
Environment type override on License parameters (System administration > Setup > Magicite) refines a type detected as not production, for example a sandbox you use for training. It never changes a detected production environment, and it applies only in the environment where you set it: in a database copied to another environment it has no effect until you set it there again. The override does not decide whether Lattice blocks: that follows the detected type and the license itself.
Key Vault and secrets
A file ingestion connection keeps each of its secrets (the authentication secret, and for PGP decryption the private key and passphrase) in one of these ways:
- Encrypted on the connection, with the platform encryption service. This works in every environment, for the authentication secret only.
- Key Vault parameters secret: the connection names a secret of type Manual on the standard Key Vault parameters page (System administration > Setup > Key Vault parameters) of a legal entity, and Finance and Operations reads it from your vault with the app registration entered on that page. This works in every environment, Microsoft-managed environments included.
- Azure Key Vault reference: only the secret's URI is stored, and Lattice reads the secret from your vault
with the Azure identity of the server it runs on (it uses
DefaultAzureCredential, which on an Azure virtual machine is the machine's managed identity).
What that means for each kind of environment:
| Environment | Key Vault parameters secret | Azure Key Vault reference | Azure Blob with no secret (managed identity) |
|---|---|---|---|
| Servers in your own Azure subscription, such as a cloud-hosted environment | Works | Works once you switch on the managed identity of each AOS and batch virtual machine and grant it read access to the vault's secrets | Works the same way, with access to the storage account |
| Microsoft-managed: sandbox and production run by Microsoft through Lifecycle Services, environments managed in the Power Platform admin center, and unified developer environments | Works | Does not work: Microsoft runs the servers and gives you no identity to grant. Lattice refuses it before any sign-in. Use a Key Vault parameters secret, or store the authentication secret Encrypted | Does not work, and is refused the same way. Store a key, SAS token or connection string, Encrypted or as a Key Vault parameters secret |
| On-premises | Works when the servers can reach your vault: it signs in with an app registration | Does not work: the servers have no managed identity | Does not work |
In a Microsoft-managed environment, a connection that uses an Azure Key Vault reference or Azure Blob without a secret fails when it runs and on Test connection with "Connection ...: ... needs the server's own Azure identity, which a Microsoft-managed environment does not provide. Name a secret on the Key Vault parameters page instead; the authentication secret can also be stored encrypted on the connection.", and saving it shows the same advice as a warning. Existing Key Vault references keep working where the servers run in your own Azure subscription; to switch a connection, enter a Key Vault parameters secret name, which clears the reference.
A file share connection always needs a stored secret: a key, a SAS token or a connection string. The PGP key and passphrase take a Key Vault parameters secret or a Key Vault reference, never an encrypted value, so in a Microsoft-managed environment use Key Vault parameters secrets for them. The APIM backend client secret is a Key Vault reference that API Management resolves itself with its own identity, in any environment; Finance and Operations never reads it. A Key Vault reference that Lattice cannot read fails with "Failed to read the secret from Azure Key Vault. Verify the secret URI and that the AOS managed identity has get access to the vault." Detail and setup: Key Vault secrets and Use the Key Vault parameters page.
Background processes on a development VM
The deployment of a package registers the Lattice background processes with process automation. A database synchronization from Visual Studio does not, so on a development VM, or whenever the Background processes tab lists no Lattice process:
- Run System administration > Setup > Initialize process automations. It registers every background process the installed modules declare, Lattice included, each time it runs, even when it answers "Process automations have already been initialized".
- Open System administration > Setup > Process automations, Background processes tab, and check that the Lattice processes are listed (the list).
- The batch service must run on the VM for the processes to run.
Each registration, by a deployment or by Initialize process automations, keeps the interval, next execution and owner you set. A Lattice background process cannot be switched off.
A new process first runs within a minute or two of its registration, and each run sets the next one an interval later, so the daily processes (Lattice service call statistics rollup, Lattice integration log cleanup, Lattice file ingestion cleanup, Lattice sales price effectivity events) keep the time of day they were first registered. To run them at another time, select the process on the Background processes tab, choose Edit and set Next execution. A later deployment keeps it.
Shared and per legal entity settings
| Stored per legal entity | Shared by all legal entities |
|---|---|
| Inbound order policy parameters and its customer rows | Service operation logging configuration |
| Sales-origin financial dimension mapping and its switch | Async operation registry |
| The Cross references tab of each module's parameters page | External systems |
| File ingestion connections and Sample payloads | |
| APIM configurator profiles | |
| Batch job event filters | |
| Recurring data job health thresholds (per job) | |
| Documentation help and License parameters |
Schedule Inbound order policy evaluation in each legal entity where the policy is on; the other scheduled jobs run once for the environment.
Telemetry
Lattice sends its telemetry (service calls, refusals, payload views) through the standard Finance and Operations telemetry to your Application Insights resource. Switch on the Monitoring and Telemetry feature in Feature management and set the resource on System administration > Setup > Monitoring and telemetry parameters in each environment you want to watch. Use a separate resource for production so test traffic does not mix with it. Without it, Lattice works and sends nothing.
On the Configure tab of that page, Lattice needs at least one event type turned on for its events (for example User sessions (Custom Events)), Custom metrics (Metrics) for its metrics, including the backlog counts sent every 5 minutes, and X++ exceptions (Failures) for its exceptions. The Azure Monitor quick start in the developer kit reads this telemetry (Downloads).
Usage counts sent to Magicite
Lattice also counts how it is used, and the licensing module sends those counts to Magicite once a day with the license check-in. Magicite uses them to see which parts of Lattice customers rely on.
- What is counted: each call of a Lattice service operation, by service, operation, whether it was a preview,
and its outcome code (
Success, or the error code the caller was given); each page action refused because of the license, by the action's label ID and the license status; and each background run that waited for the license, by the process and the license status. - What is never sent: company or legal entity IDs, users, user context, document numbers, request or correlation IDs, messages, error details, payloads, amounts or any other record value. Every value is a name from the Lattice code (a service, an operation, a label ID, a class or an enum value) and a count per day.
- Which environment: the counts are kept and reported per environment, under the environment's own identifier. A database copied from another environment never reports the other environment's counts.
- Turning it off: set Usage telemetry enabled to No on System administration > Setup > Magicite > License parameters, Behavior tab. Counting stops within a minute and the stored counts are deleted at the next daily run. The license check-in is not affected.
After a database copy
A database copied from another environment, typically from production into a sandbox, brings every Lattice setting and record with it, including the connections and jobs that reach real systems. Before the batch service runs in the target environment:
- Recurring data jobs: deactivate the ones that must not run here, then apply this environment's own configuration: I want to restore integration configuration after a database copy.
- File ingestion connections: clear Enabled on every connection that points at production storage, or point it at this environment's storage. The next scheduled pull reads every enabled connection and moves or deletes the files it takes.
- Secrets: an Encrypted secret may need to be entered again in Authentication, because the encryption key belongs to the environment. Check System administration > Setup > Key Vault parameters in each legal entity a connection names in Key Vault parameters company: a copied production record still reads the production vault with the production app registration, and its Key Vault secret key may need to be entered again. Point each record at this environment's vault and app registration. A Key Vault reference (secret URI) is not changed by the copy, and works only where the servers run in your own Azure subscription. Run Test connection on each connection you keep.
- Business events: check the endpoints on the standard Business events catalog; they still point where the source environment sent its events.
- Integration clients: check Microsoft Entra ID applications; the client IDs of the source environment came with the database.
- Environment type override: set it again if you use it.
- Background processes and catalogs: check the background processes and refresh the catalogs, as after a deployment (Install and deploy).
The other Lattice settings and the Documentation help address come across unchanged.
Related
- Environment isolation in the Security model.
- After a database movement.
- Licensing in the Deployment guide.
- Next step: Verify the setup.