Repository navigation
Microsoft 365 files, emails and events as first-class citations - #1718
Merged
Paul Lizer (paullizer) merged 5 commits intoOct 8, 2026
Conversation
SharePoint/OneDrive files, emails, and calendar events returned by the M365 actions (agent chat, workflows, and Orchestrate) now get deterministic m365- citation ids, model-facing citation markers, and a fixed list layout. Answers render them as citation chips with a source card and an Open in SharePoint/OneDrive/Outlook link, and the conversation drawer Documents pane lists them with Open online. - functions_m365_citations: ids, normalizers, https-only URLs, marker and display formatting, fail-safe annotation, trusted capture, message and conversation aggregation - Graph mail/event and M365 file tool results carry citation, citation_id, citation_instructions, and presentation fields; the annotators return an M365CitedResult whose records only the Microsoft 365 plugins can produce - Invocation logger keeps those records as m365_items before truncation; look-alike JSON from other tools never becomes a citation or link - Chat, workflow, and orchestration answers persist m365_citations with cited flags (cited and read items kept first at the 100-record limit); every final chat event carries them; the conversation keeps an owner-only used_m365_items aggregate rebuilt with used documents - Collaboration, shared orchestration copies, export, content-safety retraction, and the M365 history sharing gate carry the new field - V2 chips, source card, Documents pane sections, inspector sources; classic UI renders m365 ids as safe links or plain text - Version 0.261.303, docs, release notes, functional and UI tests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Explain why a logging failure in the citation annotation fallback is ignored - Remove an unused json import from the M365 citation UI test Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve the version and release-notes conflicts with microsoft#1716: keep VERSION 0.261.303 and keep both release-note sections, v0.261.303 above v0.261.302. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer)
added a commit
to paullizer/simplechat
that referenced
this pull request
Oct 8, 2026
microsoft#1716 shipped as 0.261.302, the version this branch used, and the open Microsoft 365 citations PR (microsoft#1718) holds 0.261.303. Move this branch to 0.261.304: config.py, its own release-notes section above v0.261.302, and the version headers and "Since" notes in its code, tests and docs. The fix doc also lists the sharing-preferences link and guardrail pin added when the base was merged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer)
merged commit Oct 8, 2026
9268a9a
into
microsoft:paullizer-react-v2-ui
11 checks passed
14 of 24 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Linked issue
Refs #1715 (companion PR A: in-chat Microsoft 365 approvals and orchestration retries; no tracking issue)
Release Notes & Latest Features
Is this visible to end users?
Is this admin-facing (Admin Settings, governance, deployment, config)?
Should this become a Latest Feature card?
Screenshot needed for the card?
(Suggested card; not added in this PR. Follow-up via
.github/prompts/update-latest-features.prompt.md.)Version bump
application/single_app/config.pyVERSIONthird segment bumped, or not needed because this is docs-only (0.261.303; the base is now 0.261.302 after Fix Microsoft 365 sign-in session race and auto-create the workflow key #1716, which is merged into this branch)deployers/version.txtbumped, or not needed becausedeployers/was not changedTesting / validation
python -m pytest functional_tests\test_m365_source_citations.py -q -p no:cacheprovider: 34 passedpython -m pytest ui_tests\test_v2_m365_source_citations.py -q -p no:cacheprovider: 4 passed (V2 chips, source card and link attributes, missing-record card, Documents pane at desktop and phone widths, classic links, no/api/get_citationcalls)python -m venv --system-site-packages+pip install -U pyopenssl→ 26.4.0; the shared interpreter's pyOpenSSL 25.3.0 breaks Semantic Kernel imports),PYTHONPATH=application\single_app;functional_tests:python -m pytest functional_tests\test_m365_source_citations.py functional_tests\test_m365_chat_preflight_order.py functional_tests\test_m365_provider_core.py functional_tests\test_orchestration_m365_actions.py functional_tests\test_orchestration_m365_file_actions.py functional_tests\test_chat_cited_source_tracking.py functional_tests\test_workflow_result_masking.py -q -p no:cacheprovider: 253 passednpm run buildinapplication\v2_ui(tsc -b && vite build): passed (existing chunk-size warning only)python .\functional_tests\test_docs_app_surface_coverage.py: 7/7 passed;python .\functional_tests\test_docs_site_quality.py: 6/6 passed (inventory regenerated; unchanged, since no settings, actions or controls were added)python -m pytest functional_tests\route_tests\test_route_blueprint_policy_inventory.py functional_tests\route_tests\test_route_policy_test_coverage.py -q: 17 passed (no routes added or changed)python scripts\check_xss_sinks.py --base-sha fa3422dee --head-sha HEAD <34 changed application files>: passedpython scripts\check_broken_access_control.py --base-sha fa3422dee --head-sha HEAD <21 changed Python files>: passedgit diff --check: cleanfa3422dee). Failures were identical on both, all environmental (Cosmos-boundconfigimports, pyOpenSSL,node_modulesmissing in the base checkout), and no new failures.test_m365_chat_preflight_order.pyAST-loads_set_authorized_chat_request_context, so it now gets the new time-zone helper in its namespace and asserts the recorded zone.test_m365_provider_core.pynow allows the addedcitation_id/citationkeys.npm run typecheck: passedpython -m pytest functional_tests\test_m365_source_citations.py functional_tests\test_m365_chat_preflight_order.py functional_tests\test_m365_connections.py functional_tests\test_m365_routes.py ui_tests\test_v2_m365_source_citations.py -q: 126 passed, 1 failed. The failure istest_m365_routes.py::test_real_notification_helper_only_targets_subject_and_deduplicates, which fails the same way on the pure base81e78a34d(ImportErrorforfunctions_groupin this local environment), so it isn't caused by this PR.m365_citations; workflow answers didn't attach them; and an out-of-range Graph date could fail the tool. While fixing these I also found that the final-event normalizers (document action, compatibility, workflow result and saved analysis) droppedm365_citations; that's fixed too. The two CodeQL findings (an emptyexceptwithout a comment, an unused import) are fixed inbc43ab5.Documentation
### **(v0.261.303)**→ New Features)docs/explanation/features/M365_SOURCE_CITATIONS.md; action references for Email, Calendar, SharePoint and OneDrive;docs/reference/chat-controls.md)Security checklist
@swagger_route(security=get_auth_security())(no new routes)sanitize_settings_for_user()(no settings sent)Notes for reviewers
Trust boundary:
annotate_*returns anM365CitedResult(a dict subclass whose records are an attribute, so they're never serialized to the model). The invocation logger keeps only those records, and nothing parses records back out of a result's shape.Display time zone: uses the browser's IANA zone, which both UIs now send as
time_zone, rather than the mailbox zone. Mailbox settings need the Calendar action's permission, and Outlook often uses Windows zone names. Orchestration uses the turn's zone when workflow proposals or results are configured; otherwise it uses UTC (documented).Where annotation happens: in
get_my_messages/get_my_eventsafter coverage, not in_shape_graph_result, because both use the paginated path. This covers the M365 Email/Calendar actions and the legacy Microsoft Graph action.Owner-only aggregate:
used_m365_itemsin conversation metadata is filtered to the requesting owner; shared viewers get none. Per-messagem365_citationstravel whereveragent_citationsalready do, and the M365 history-sharing gate counts them.Merging with PR A (Decide Microsoft 365 approvals in the chat and tidy orchestration retries #1715): Fix Microsoft 365 sign-in session race and auto-create the workflow key #1716 already took 0.261.302 on the base, so PR A needs a new patch number. Whichever of PR A and this PR merges second should take the next free number and put its release-notes section on top. A trial merge with PR A conflicts only in:
config.pyrelease_notes.mdMessageInspector.tsximport block (keep PR A'snormalizeOrchestrationAttemptandopenOrchestrationRecoveryimports and this PR'sm365ChipLabel, m365SecondaryLineimport)Everything else merges automatically.