Share via


Use SecretText with control add-ins and in JSON objects

Enabled for Public preview General availability
Admins, makers, marketers, or analysts, automatically May 2, 2025 May 2, 2025

Business value

SecretText can now be used with control add-ins as well as JSON objects. This allows AL developers to integrate credentials with JavaScript-based authentication solutions, and embed secrets when working with JSON objects.

Feature details

Pass SecretText to control add-ins

It's now possible to pass a value of the type SecretText to control add-in procedures. This permits the integration of credentials with JavaScript-based authentication solutions.

New method to add SecretText values to JSON objects - WriteWithSecretsTo

A new method has been added to the JsonObject type, which allows developers to add SecretText values. To use it, the AL developer first creates a JSON object with placeholder values for their secret values. Then, they provide paths to the values in the JPath format as well as the values themselves. Finally, the method produces a new SecretText value with the credentials replaced.

Example of using SecretText in JsonObject

Tell us what you think

Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.