Microsoft presents: Behind the scenes of how we build the new Expense Agent
Expense Agent for Business Central, in public preview and US only: architecture, setup, limits, and how Microsoft built and evaluated it. Covers email, web and mobile submission, expense users without BC licenses, categories, rules, approval, posting, and offline and online LLM evals.
- Introduction and Agenda
- Expense Agent Architecture Overview
- Email Processing and Shared Mailbox Setup
- UI Experience and Asynchronous Processing
- Receipt Extraction and Itemization
- Multi-Language Support and Mileage Calculations
- Currency Conversion and Web App
- Mobile App and Receipt Feed
- Data Validation and Approval Workflow
- Speedboat Team Structure and AI-First Approach
- Agentic Development and Code Generation
- Unified Repo Architecture and Model-First Approach
- Introduction to Evaluation Methodology
- Testing Challenges with Probabilistic Systems
- Offline and Online Evaluation Types
- Dataset Creation and Ground Truth Labeling
- Synthetic Data and Corner Cases
- Quality Metrics and Accuracy Pipeline
- Hill Climbing Loop for Model Improvement
- Model Comparison and Selection
- Security and Harmful Eval Testing
- Online Evals in Production
- Eval-Driven Development and Key Takeaways
- Service Architecture and Design Principles
- Processors and Data Flow to Business Central
- Activation and Authorization Flow
- Expense Submission and Processing Pipeline
- Expense Agent Capabilities and Goals
- Current Preview Status and Expense Management Module
- Expense Agent Configuration Overview
- Client Access, Shared Mailbox, and Expense User Setup
- Welcome Email and Expense User Configuration
- Default Configurations and Posting Groups
- Expense Categories and Subcategories
- Category Refundability and Compliance Rules
- Rules and Policies Configuration
- Additional Agent Configuration and Setup Pages
- Consumption Tracking and Expense Reporting
- Expense Report Management and Reimbursement Logic
- Billable Expenses and Project Assignment
- Expense Posting and GL Entries
- User Feedback Mechanisms at Expense Level
- Public Preview Status and Geographic Availability
Overview
The session from Microsoft’s Expense Agent team covers the agent from three angles. First it shows what the agent does: it reads receipts, itemizes and categorizes them, handles several languages and currencies, and calculates mileage and per diem. Expenses reach it by shared mailbox or web app, with a mobile client coming later. Business Central remains the backend where data is stored.
It then explains how the team built it. The team worked AI-first, with 99 percent plus of the code generated and everything kept in one repository. Quality was managed with evals: 1,500 mostly hand-labeled datasets, a 95 percent accuracy requirement, a hill climbing loop, model comparison, red-team testing and online LLM-judge evals. The last part walks through the Azure service architecture, the Business Central setup (expense users, categories, rules, consumption page, reports, posting) and the current limits.
Key points
- The Expense Agent is in public preview and available in the US only. More regions were said to come the following month.
- Expense users are a new Business Central entity attached to employees. They need no BC license and can submit by web app or shared mailbox. A mobile client is coming. Existing employees can be imported in one action.
- Limits mentioned: 10 MB per expense file, 25 files and 50 MB per batch, 100 emails per company in the shared mailbox scenario, and 50 expenses per expense user per company per day. These limits are hardcoded for now.
- Category and subcategory descriptions act as prompts for the agent, so their detail affects categorization accuracy. Rules cover amounts, thresholds and required information. Natural-language policies are not yet available.
- Some steps are still manual, such as setting mileage information and posting. For now, projects are attached to expense lines or reports in Business Central. Attaching them from the web app is work in progress.
- Microsoft requires 95 percent accuracy to ship an agentic system. The team started at 65 percent and used 1,500 labeled datasets, synthetic edge cases, a hill climbing loop and model comparison to improve it.
- The service uses Azure Front Door, a Python gateway for authentication, and Azure Functions processors. Redis caching limits repeated lookups when locating a user’s Business Central environment.
Features
| Feature | Status | At | Evidence |
|---|---|---|---|
| Expense Agent | preview, demoed | 0:04 | “we are already in public preview. Uh we are in US only. More regions will come next month” (1:12:00) |
| Receipt Extraction via AI | status not stated, demoed | 4:43 | |
| Mileage Expense Calculation | status not stated, demoed | 7:53 | |
| Per Diem Allowance Detection | status not stated, demoed | 7:21 | |
| Multi-Language Receipt Processing | status not stated, demoed | 6:05 | |
| Currency Conversion | status not stated, demoed | 9:08 | |
| Mobile Expense Submission | status not stated, demoed | 10:23 | |
| Web App for Expense Entry | status not stated, demoed | 10:04 | |
| Approval Workflow | status not stated, demoed | 14:04 | |
| Policy and Rules Engine | status not stated | 13:02 | |
| Receipt Confirmation UI | status not stated, demoed | 13:33 | |
| Speedboat Team Methodology | status not stated | 15:14 | |
| AI-First Development Approach | status not stated | 17:10 | |
| Agentic Development with Code Generation | status not stated | 17:52 | |
| Unified Repository Architecture | status not stated | 18:53 | |
| Model-First LLM Approach | status not stated | 19:38 | |
| Offline Evaluation Methodology | status not stated | 23:41 | |
| Online Evaluation with LLM Judge | status not stated | 23:55 | |
| Receipt Data Extraction and Categorization | status not stated, demoed | 24:26 | |
| Dataset Preparation with Ground Truth Labeling | status not stated | 27:09 | |
| Synthetic Data Generation for Edge Cases | status not stated | 28:21 | |
| Automated Quality Pipeline | status not stated, demoed | 29:18 | |
| 95 Percent Accuracy Requirement | status not stated | 30:15 | |
| Hill Climbing Loop | status not stated, demoed | 30:26 | |
| Model Comparison Framework | status not stated, demoed | 31:30 | |
| Harmful Eval Testing and Red Teaming | status not stated, demoed | 32:51 | |
| Online Evals in Production | status not stated, demoed | 33:58 | |
| Eval-Driven Development | status not stated | 36:14 | |
| Expense Agent Architecture | status not stated | 37:24 | |
| Azure Front Door Entry Point | status not stated | 39:26 | |
| Gateway Component | status not stated | 40:09 | |
| Global Service Instances | status not stated | 40:33 | |
| Authorization and Authentication Flow | status not stated | 43:16 | |
| Azure Architecture Components | status not stated | 39:00 | |
| Expense Management Module | status not stated | 49:47 | |
| Expense Users Entity | status not stated, demoed | 51:53 | |
| Shared Mailbox Integration | status not stated, demoed | 51:40 | |
| Mobile Client Support | status not stated | 51:53 | |
| Import Existing Employees as Expense Users | status not stated, demoed | 52:58 | |
| Welcome Email for Expense Users | status not stated, demoed | 53:28 | |
| Expense User Approver Configuration | status not stated, demoed | 54:34 | |
| Default Configurations for Agent Activation | status not stated, demoed | 55:12 | |
| Expense Categories with Descriptions | status not stated, demoed | 56:48 | |
| Expense Subcategories | status not stated, demoed | 58:39 | |
| Per Diem and Location Configuration | status not stated | 1:00:09 | |
| Expense Rules Configuration | status not stated, demoed | 1:00:32 | |
| Expense Policies | preview (roadmap AI-Driven Approvals), demoed | 1:02:25 | “we are working for the policies as well uh which will come uh pretty soon” (1:03:01) |
| Expense Report Open Notification | status not stated, demoed | 1:03:31 | |
| Mileage Expense Configuration | status not stated | 1:04:19 | |
| Expense Agent Consumption Tracking | status not stated, demoed | 1:04:59 | |
| Expense Agent KPIs | status not stated, demoed | 1:05:23 | |
| Expense Report View and Adjustment | status not stated, demoed | 1:06:02 | |
| Intelligent Reimbursement Classification | status not stated, demoed | 1:07:28 | |
| Refundable Classification Tab | status not stated, demoed | 1:07:56 | |
| Billable Expense Line Marking | status not stated, demoed | 1:08:14 | |
| Project Attachment to Expenses | status not stated, demoed | 1:08:30 | |
| Expense Posting Workflow | status not stated, demoed | 1:09:12 | |
| Expense-Level Feedback with Thumbnails | status not stated, demoed | 1:10:25 | |
| Generic Feature Feedback Mechanism | status not stated | 1:11:29 |
A status with a roadmap link comes from the Microsoft 365 roadmap feature this part of the video covers (matched by Haiku; links Opus dropped are not used); other statuses need a status word in the video itself.
AL objects mentioned
As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.
- other “Opus 4.5” at 18:05
- other “GitHub Copilot CLI” at 18:23
- other “LLM judge” at 24:20
- other “Azure Front Door” at 39:38
- other “Gateway” at 40:22
- other “Sales Order Agent” at 51:06
- other “Payable Agent” at 51:06
- other “Expense Agent” at 51:06
- other “Graph API” at 52:58
- page 6910 “Expense Report” at 1:06:02
- page “expense agent setup page” at 1:04:37
- page “agent consumption page” at 1:04:59
Not found in BC28-30: page “expense agent setup page”, page “agent consumption page”.
Quotes
- 0:46 “It’s still in preview will be for a little while. uh very important that we get the the feedback back.”
- 0:56 “this expense agent is not a conventional business central agent”
- 1:40 “we wanted nonBC users I mean all your employees don’t you wouldn’t like to have a to buy a license for all the employees”
- 1:58 “we are still using BC as the back end. It’s where all data goes. It doesn’t go anywhere else really.”
- 5:31 “this actually works remarkably well and uh and uh actually cuts out a lot of humans errors”
Disclaimers in the video
- 0:46 preview: It’s still in preview will be for a little while
- 19:52 preview: We’re even working on like truly policy validation from written policies. We’re not quite there yet.
- 33:58 other: the 1,500 data sets we have maybe is not enough because the as I said the universe of uh of …
- 37:12 other: there is a session in couple of hours from my colleagues Claus and Cloudu which they will talk more in …
- 45:51 subject-to-change: if you feel that this doesn’t fit your need or maybe you want them configurable because now are hardcoded please …
- 48:57 preview: as we speak right now uh we are in public preview
- 49:13 subject-to-change: there are few things that you still have to do manually. For example, setting the uh for example the mileage …
- 49:33 coming-later: this is our goal uh on our speedboard uh we want to do in in coming months
- 51:53 coming-later: pretty soon we will also have the mobile client as well
- 1:03:01 coming-later: we are working for the policies as well uh which will come uh pretty soon
- 1:08:45 coming-later: pretty soon uh the expense users will also be able to attach a project from the web app as well. …
- 1:10:05 preview: this is a new and still in public preview
- 1:12:00 coming-later: we are in US only. More regions will come next month
Presenters (as heard): Christian, Casim, Michael, Cyprin, Claus, Cloudu, Sepan, Kasim.
