Dynamics 365 Business Central – Data Type SecretText

With the Introduction of Business Central 2023 Wave 2 Microsoft Introduced new data type called SecretText.

The introduction of the SecretText data type in Dynamics 365 Business Central 2023 Wave 2 (version 23). With AL language version 12 is a significant enhancement for managing sensitive data securely within AL code.

Here’s a brief overview of what SecretText is and how it can be used:

What is SecretText?

SecretText is a new data type designed to handle sensitive information, such as passwords or API keys, within AL code.

The key feature of SecretText is that it protects this sensitive data from being exposed through debugging or other means that could inadvertently reveal it.

Key Features:

Protection from Debugging:

Values stored in SecretText variables are not displayed in the debugging tools. This prevents sensitive information from being revealed during the debugging process.

  • Secure Handling: SecretText is specifically designed to ensure that sensitive information is handled securely, minimizing the risk of accidental exposure.
  • Ease of Use: Use SecretText in the same way as other text types but with enhanced security for the values stored.

Example Usage: Use a SecretText variable in AL code:

Practical Considerations:

  • Integration with Services: If you are integrating with external services or APIs that require sensitive credentials, SecretText is useful for storing these credentials securely.
  • Avoid Hardcoding Secrets: While SecretText helps protect data, it’s still good practice to avoid hardcoding secrets directly in the code. Consider using configuration settings or secure vaults where possible.

By using SecretText, you can better protect sensitive data within their Business Central applications.

Please follow up for next update. 

Thanks!!