Skip to main content

Notifications

Community site session details

Community site session details

Session Id :

Retrieving Masked Field Values Programmatically in Dynamics 365

Inogic Profile Picture Inogic 1,043 Super User 2025 Season 1

Are you working on a Dynamics 365 Customer Engagement (CE) project and facing challenges integrating a payment system that needs access to sensitive data—like a customer’s full bank account number?

You’re not alone.

Imagine developing backend plugins with elevated privileges, expecting full access via the System Admin role—only to find sensitive fields still masked.

That’s because Dynamics 365 enforces data masking even in backend code, leaving developers searching for solutions.

The Issue: Masked Values Only

Bank account numbers might be stored on the account entity, but your plugin likely retrieves values like ****5678—not the actual number. Even with admin-level access, the data remains masked, disrupting the payment process.

Example:

Entity account = service.Retrieve("account", accountId, new ColumnSet("new_bankaccount"));string accountNumber = account["new_bankaccount"].ToString(); // returns ****5678

This was clearly a problem—the payment gateway needs the actual account number, not a masked one. As a result, the entire payment workflow was failing....Read More>>

Comments