---
id: post/yzhums-com/69019
type: post
title: "Dynamics 365 Business Central: Set a PDF password for the report (Password protect the document using a user and admin passwords) – No control add-in and APIs"
summary: The OnPreRendering report trigger in Business Central 2025 release wave 1 enables developers to add PDF password protection to exported reports using user and admin passwords without requiring control add-ins or APIs. The trigger runs after the report dataset is finalized but before rendering, allowing protection settings to be added to the rendering payload.
tier: community
language: en
tags:
  - pdf password protection
  - report extensions
  - onprerendering trigger
  - document security
  - business central 2025
system: reporting
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:41:26.323Z"
  flags: []
generated:
  at: "2026-10-26T05:51:10.938Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 0ad9071a3d5ad506739292abf5bae381c66e587d54ea1d557503d06b8600ee2a
evidence:
  - kind: blog
    url: https://yzhums.com/69019/
    title: "Dynamics 365 Business Central: Set a PDF password for the report (Password protect the document using a user and admin passwords) – No control add-in and APIs"
    date: "2025-11-25"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://yzhums.com/69019/
    title: "Dynamics 365 Business Central: Set a PDF password for the report (Password protect the document using a user and admin passwords) – No control add-in and APIs"
    date: "2025-11-25"
    commit: null
    t: null
    quote: "OnPreRendering (Report) trigger: Runs when a report dataset has been finalized and before the output artifact has been rendered."
  - kind: blog
    url: https://yzhums.com/69019/
    title: "Dynamics 365 Business Central: Set a PDF password for the report (Password protect the document using a user and admin passwords) – No control add-in and APIs"
    date: "2025-11-25"
    commit: null
    t: null
    quote: Password protect the document using a user and admin passwords.
  - kind: blog
    url: https://yzhums.com/69019/
    title: "Dynamics 365 Business Central: Set a PDF password for the report (Password protect the document using a user and admin passwords) – No control add-in and APIs"
    date: "2025-11-25"
    commit: null
    t: null
    quote: Notice that if this element is empty, the platform will apply the user password to this field.
links:
  learn: []
  objects:
    - object/report/1305
    - object/report/1306
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  related:
    - to: post/mohana-blog/tag-blogger-com-1999-blog-1492436440038408053-post-4594837215872264619--a1f1a65db5
      title: "Composite Layouts in Business Central 29.0: Brand One Report End to End"
      label: possibly related
      why: both name Report 1306 "Standard Sales - Invoice"
      by: code
    - to: post/yzhums-com/70137
      title: "Dynamics 365 Business Central: Adding comments to Factbox/Report (Displaying Comments in a FactBox/Report)"
      label: possibly related
      why: both name Report 1305 "Standard Sales - Order Conf."
      by: code
    - to: post/yzhums-com/70415
      title: "Dynamics 365 Business Central: How to run a Report in Preview Mode without the Request Page (Hide Request Page)"
      label: possibly related
      why: both name Report 1306 "Standard Sales - Invoice"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/reports/report-1305
      title: Standard Sales - Order Conf. (report)
      label: possibly related
      why: names Report 1305 "Standard Sales - Order Conf."
      by: code
post_id: "69019"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/69019/
published_at: "2025-11-25T01:07:46.000Z"
author: Yun Zhu
full_text: false
words: 418
quotes:
  - text: "OnPreRendering (Report) trigger: Runs when a report dataset has been finalized and before the output artifact has been rendered."
    why_it_matters: Defines the precise timing when developers can add password protection to PDF reports
  - text: Password protect the document using a user and admin passwords.
    why_it_matters: Clarifies the two-level password protection capability available through the trigger
  - text: Notice that if this element is empty, the platform will apply the user password to this field.
    why_it_matters: Important behavior to understand when only user password is specified
code_objects_mentioned:
  - report Standard Sales - Order Conf.
  - report Standard Sales - Invoice
systems:
  - reporting
  - development
  - platform
versions_mentioned:
  - Business Central 2025 release wave 1
  - Runtime version 15.0
cautions:
  - kind: preview-disclaimer
    quote: Available or changed with runtime version 15.0 – Business Central 2025 release wave 1
    objects:
      - type: other
        name: OnPreRendering (Report) trigger
    events:
      - OnPreRendering
    versions:
      - Business Central 2025 release wave 1
  - kind: gotcha
    quote: Notice that if this element is empty, the platform will apply the user password to this field.
    objects:
      - type: other
        name: protection\admin
    events: []
    versions: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2025/11/Snipaste_2025-11-25_09-54-10.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:11:40.169Z"
---

# Dynamics 365 Business Central: Set a PDF password for the report (Password protect the document using a user and admin passwords) – No control add-in and APIs

[Read the post](https://yzhums.com/69019/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2025-11-25 · 418 words · tier community · reviewed (checked by Opus)

> The OnPreRendering report trigger in Business Central 2025 release wave 1 enables developers to add PDF password protection to exported reports using user and admin passwords without requiring control add-ins or APIs. The trigger runs after the report dataset is finalized but before rendering, allowing protection settings to be added to the rendering payload.

## Key points

- OnPreRendering trigger available in runtime version 15.0 and Business Central 2025 wave 1
- Add user password to require authentication to open PDF, and optional admin password for full access
- Protection settings are configured by creating a JsonObject and adding it to the RenderingPayload
- Password protection works for both standard report exports and Attach as PDF feature
- No external tools, APIs, or control add-ins needed for basic password protection

## Quotes

- "OnPreRendering (Report) trigger: Runs when a report dataset has been finalized and before the output artifact has been rendered." (Defines the precise timing when developers can add password protection to PDF reports)
- "Password protect the document using a user and admin passwords." (Clarifies the two-level password protection capability available through the trigger)
- "Notice that if this element is empty, the platform will apply the user password to this field." (Important behavior to understand when only user password is specified)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- [report 1305 "Standard Sales - Order Conf."](../../objects/report/1305.md)
- [report 1306 "Standard Sales - Invoice"](../../objects/report/1306.md)

## Possibly related

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

- [Composite Layouts in Business Central 29.0: Brand One Report End to End](../../posts/mohana-blog/tag-blogger-com-1999-blog-1492436440038408053-post-4594837215872264619--a1f1a65db5.md) — possibly related: both name Report 1306 "Standard Sales - Invoice"
- [Dynamics 365 Business Central: Adding comments to Factbox/Report (Displaying Comments in a FactBox/Report)](../../posts/yzhums-com/70137.md) — possibly related: both name Report 1305 "Standard Sales - Order Conf."
- [Dynamics 365 Business Central: How to run a Report in Preview Mode without the Request Page (Hide Request Page)](../../posts/yzhums-com/70415.md) — possibly related: both name Report 1306 "Standard Sales - Invoice"
- [Standard Sales - Order Conf. (report)](https://learn.microsoft.com/dynamics365/business-central/reports/report-1305) — possibly related: names Report 1305 "Standard Sales - Order Conf."

## Heads up

- preview-disclaimer: "Available or changed with runtime version 15.0 – Business Central 2025 release wave 1" (about other OnPreRendering (Report) trigger, OnPreRendering, version Business Central 2025 release wave 1)
- gotcha: "Notice that if this element is empty, the platform will apply the user password to this field." (about other protection\admin)

## Context

- Features: PDF password protection, OnPreRendering trigger, User password, Admin password, Report extensions, PDF attachments for electronic invoicing
- Versions: Business Central 2025 release wave 1, Runtime version 15.0

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
