An agent's workflow calls a different API URL in dev, test and production. How should the URL be configured?
- Exam domain
- Test and manage agents25–30% of the exam
- Difficulty
- Medium
- In this mock
- 13 questions on this domainPractise this domain
Why the exam asks this
Implement application lifecycle management (ALM) for agents in Copilot Studio
Objective in the exam guide: Create and use environment variables
Configuration that changes per stage must not require code changes.
Why B is the answer
An environment variable per environment
Environment variables hold values that differ by environment. Keep them in the same solution as the agent, and set values per environment at deployment.
Remember: Per-environment values are environment variables.
How it works
An environment variable is a solution component whose value can differ in each environment.
Clues in the question
The words that point to the answer, and what each one tells you.
- different API URL in dev, test and production
- Environment variable.
In detail
- Managed deployments change only variable values downstream.
- Pipelines can set values as part of deployment.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. As a different workflow per environmentWrong
Separate workflows multiply maintenance.
B. An environment variable per environmentRight
Per-environment values are environment variables.
C. Hard-coded in the workflow and edited after each importWrongMost tempting
Editing after import creates unmanaged changes and drift.
Why it tempts: Editing after import works once, but it breaks managed ALM.
D. In the agent's instructionsWrong
Instructions are not configuration for workflows.
Use case
An illustrative scenario, not a real incident.
Illustrative: the variable "SupplierApiUrl" points to the sandbox in test and the live API in production, with no edits to the workflow.
See it in different ways
flowchart LR S0["Dev custom unmanaged solution"] --> S1["Add agent and required objects"] --> S2["Pipeline deploys managed solution"] --> S3["Test set variable values"] --> S4["Production"]
How to read this chart
- Read it in order: Dev custom unmanaged solution, then Add agent and required objects, then Pipeline deploys managed solution, then Test set variable values, then Production.
mindmap
root(("SupplierApiUrl"))
n1["Dev"]
n2["dev endpoint"]
n3["Test"]
n4["sandbox endpoint"]
n5["Production"]
n6["live endpoint"]How to read this chart
- The centre is "SupplierApiUrl".
- "Dev" covers "dev endpoint".
- "Test" covers "sandbox endpoint".
- "Production" covers "live endpoint".