---
id: change/bcapps/11997
type: change
title: "#11997 Clarify Expense Agent Entra app permission checks"
summary: Permission checks for the Expense Agent Entra app have been reordered to match the setup flow and documented to clarify why non-SUPER users need additional permissions beyond Expense Mgmt. Admin.
tier: official
language: en
tags:
  - refactor
  - main
  - bc30
  - codeunit expense agent entra app mgt.
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-23T01:11:43.893Z"
  flags: []
generated:
  at: "2026-11-17T00:16:35.786Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: b1c742427037e147c35391ba1282d0aa39dcd5b4
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11997
    title: "microsoft/BCApps#11997: Clarify Expense Agent Entra app permission checks"
    date: "2026-10-22"
    commit: b1c742427037e147c35391ba1282d0aa39dcd5b4
    t: null
    quote: Reorder the Expense Agent Entra application authorization checks to follow the setup flow.
links:
  learn: []
  objects:
    - object/codeunit/6922
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-agent-configuration-page
      title: Set Up Expense Agent in Business Central
      label: possibly related
      why: Explains Expense Agent setup configuration including permission and security checks.
      by: model
number: 11997
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11997
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-22T18:37:24Z"
author: encimita
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Finance"
change_class: code
change_kind: refactor
behavior_change: false
breaking: false
files:
  count: 1
  additions: 13
  deletions: 11
  al: 1
apps:
  - ExpenseAgent
objects_touched:
  - key: codeunit/6922
    page: codeunit/6922
    type: codeunit
    id: 6922
    name: Expense Agent Entra App Mgt.
    app: ExpenseAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 649970
systems:
  - copilot
quote: Reorder the Expense Agent Entra application authorization checks to follow the setup flow.
joined_against:
  major: "30"
  commit: eb2bfe5258a473c969a6b85cdc98ce8524408706
---

# #11997 Clarify Expense Agent Entra app permission checks

> Permission checks for the Expense Agent Entra app have been reordered to match the setup flow and documented to clarify why non-SUPER users need additional permissions beyond Expense Mgmt. Admin.

[Pull request](https://github.com/microsoft/BCApps/pull/11997) · merged into `main` (BC30) on 2026-10-22 by encimita · 1 file (+13 -11), 1 AL · refactor · tier official · reviewed (checked by Opus)

## What changed

- Reordered authorization checks to follow the setup flow sequence
- Added documentation explaining why non-SUPER users require SECURITY, Expense Agent, and Agent - Admin permissions
- Preserved existing SUPER user bypass behavior
- Authorization rule remains: SUPER or (Expense Mgmt. Admin and SECURITY and Expense Agent and Agent - Admin and Configure All Agents)
- No changes to actual permission model or runtime behavior

## AL objects touched

- [Codeunit 6922 "Expense Agent Entra App Mgt."](../../objects/codeunit/6922.md), ExpenseAgent: modified

## Context

- Work items: AB#649970
- Labels: AL: Apps (W1), Team: Finance
- Systems: copilot
- From the description: "Reorder the Expense Agent Entra application authorization checks to follow the setup flow."

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Set Up Expense Agent in Business Central](https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-agent-configuration-page) — possibly related: Explains Expense Agent setup configuration including permission and security checks. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
