---
id: change/bcapps/11909
type: change
title: "#11909 Block guest users from managing Expense Agent"
summary: Guest users and external administrators can no longer enable or disable Expense Agent or schedule or stop its tasks. External users are detected from the Business Central authentication email, with the access token identity-provider claim as a fallback.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit ea http client
  - page expense agent setup wizard
  - page expense agent status
  - table expense agent setup
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-18T00:55:29.182Z"
  flags: []
generated:
  at: "2026-10-30T07:47:07.587Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: e51c552efbeb6821db450b199aae6b015371866c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11909
    title: "microsoft/BCApps#11909: Block guest users from managing Expense Agent"
    date: "2026-10-16"
    commit: e51c552efbeb6821db450b199aae6b015371866c
    t: null
    quote: Prevent guest users and external administrators from enabling or disabling Expense Agent.
links:
  learn: []
  objects:
    - object/codeunit/6941
    - object/page/6991
    - object/page/7076
    - object/table/6930
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11909
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11909
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-16T14:04:32Z"
author: encimita
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 57
  deletions: 1
  al: 4
apps:
  - ExpenseAgent
objects_touched:
  - key: codeunit/6941
    page: codeunit/6941
    type: codeunit
    id: 6941
    name: EA Http Client
    app: ExpenseAgent
    status: modified
  - key: page/6991
    page: page/6991
    type: page
    id: 6991
    name: Expense Agent Setup Wizard
    app: ExpenseAgent
    status: modified
  - key: page/7076
    page: page/7076
    type: page
    id: 7076
    name: Expense Agent Status
    app: ExpenseAgent
    status: modified
  - key: table/6930
    page: table/6930
    type: table
    id: 6930
    name: Expense Agent Setup
    app: ExpenseAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 637452
systems:
  - copilot
quote: Prevent guest users and external administrators from enabling or disabling Expense Agent.
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #11909 Block guest users from managing Expense Agent

> Guest users and external administrators can no longer enable or disable Expense Agent or schedule or stop its tasks. External users are detected from the Business Central authentication email, with the access token identity-provider claim as a fallback.

[Pull request](https://github.com/microsoft/BCApps/pull/11909) · merged into `main` (BC30) on 2026-10-16 by encimita · 4 files (+57 -1), 4 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Guest and external administrator access is blocked from Expense Agent configuration changes
- Detection of external users uses Business Central authentication email or identity-provider claim as fallback
- Task scheduling and state changes trigger access validation before any state modification
- Limited task-scheduling warning removed as users are now blocked at configuration stage
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 6941 "EA Http Client"](../../objects/codeunit/6941.md), ExpenseAgent: modified
- [Page 6991 "Expense Agent Setup Wizard"](../../objects/page/6991.md), ExpenseAgent: modified
- [Page 7076 "Expense Agent Status"](../../objects/page/7076.md), ExpenseAgent: modified
- [Table 6930 "Expense Agent Setup"](../../objects/table/6930.md), ExpenseAgent: modified

## Context

- Work items: AB#637452
- Labels: AL: Apps (W1), Team: Finance
- Systems: copilot
- From the description: "Prevent guest users and external administrators from enabling or disabling Expense Agent."

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).
