<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: power BI mask function in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/158847#M11839</link>
    <description>&lt;P&gt;&lt;SPAN class=""&gt;You are encountering a key intersection nuance of &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Unity Catalog Dynamic Data Masking&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt; and &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Power BI Import Mode semantics&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In Power BI Import mode, data is extracted and baked into the semantic model at refresh time. The extraction query is executed using the credentials of the identity configured for the dataset refresh. If that identity has &lt;STRONG&gt;UNMASKED&lt;/STRONG&gt; privileges in Unity Catalog, the data is pulled unmasked into Power BI. Once imported, the data loses its Databricks-side &lt;STRONG&gt;masking context&lt;/STRONG&gt;. Anyone with access to the Power BI report will see the unmasked data, which is a severe &lt;STRONG&gt;security and compliance risk&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Even though the user who created the connection can see unmasked data, the actual identity executing the refresh in the &lt;STRONG&gt;Power BI Service&lt;/STRONG&gt; does not have the &lt;STRONG&gt;UNMASKED&lt;/STRONG&gt; privilege. Power BI dataset refresh credentials are distinct from the person who authored the report. If the dataset is configured to refresh using a Service Principal, a Gateway account or a different user account that lacks the explicit UNMASKED grant, Unity Catalog will dynamically mask the data during the extraction phase.&lt;/P&gt;&lt;P&gt;You can follow below&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Import Mode Refresh Identity&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;Fix&lt;/STRONG&gt; (If Import Mode is &lt;STRONG&gt;required&lt;/STRONG&gt;) - If you must use Import mode for performance reasons, you must ensure the exact identity performing the refresh has the correct privileges and you must restrict report access. Find the&amp;nbsp;&lt;SPAN&gt;exact account (User or Service Principal) being used for OAuth2 authentication under Data Source Credentials and give it relevant access to view unmasked data in report. You can run the Databricks job or Power BI refresh again and the data will now import unmasked.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Because the data is now unmasked in Power BI, you &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;must&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt; apply &lt;STRONG&gt;Power BI Object-Level Security (OLS) or Row-Level Security (RLS)&lt;/STRONG&gt; to hide or restrict the PII columns for general report viewers.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;DirectQuery Recommended- &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;You can &lt;SPAN&gt;move away from Import mode for PII-heavy tables and the users can dynamically view unmasked data based on their privilege in the UC.&amp;nbsp;Configure the Databricks data source in Power BI to use &lt;STRONG&gt;OAuth2 with &lt;/STRONG&gt;SSO.&amp;nbsp;When a user views the report, Power BI passes that specific user’s Entra ID identity to Databricks. Unity Catalog evaluates the Dynamic Data Masking policy. If the user has UNMASKED privilege, they see the data. If they dont, Databricks returns the masked data.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;You can automate the publication of a Power BI report directly from a Databricks Workflow using the Power BI API or the Python client library. However, the publishing mechanism does not dictate the masking.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;You can update the report to use DirectQuery with SSO as it delegates PII governance to Unity Catalog, ensures masking based on the viewer's identity and removes the security burden from Power BI.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jun 2026 04:27:01 GMT</pubDate>
    <dc:creator>balajij8</dc:creator>
    <dc:date>2026-06-12T04:27:01Z</dc:date>
    <item>
      <title>power BI mask function</title>
      <link>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/158832#M11837</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;My table in databricks is using a function to mask PII columns, in my power BI report I am using import mode.&lt;/P&gt;&lt;P&gt;I notice that my report in power BI will have the PII masked depending on the privileges of the user who publish the report, it means if the user who publish the report can see unmask data every user can see the report with unmask data.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am trying to refresh the semantic model of the report in a databricks job, but despite the user who create the connection can see unmask data the report is still masked.&lt;BR /&gt;&lt;BR /&gt;So, my question is: How can I solve this? is there a way to publish the report directly from databricks but having the report with the PII unmasked.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2026 21:15:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/158832#M11837</guid>
      <dc:creator>carlos_tasayco</dc:creator>
      <dc:date>2026-06-11T21:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: power BI mask function</title>
      <link>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/158847#M11839</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;You are encountering a key intersection nuance of &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Unity Catalog Dynamic Data Masking&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt; and &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Power BI Import Mode semantics&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In Power BI Import mode, data is extracted and baked into the semantic model at refresh time. The extraction query is executed using the credentials of the identity configured for the dataset refresh. If that identity has &lt;STRONG&gt;UNMASKED&lt;/STRONG&gt; privileges in Unity Catalog, the data is pulled unmasked into Power BI. Once imported, the data loses its Databricks-side &lt;STRONG&gt;masking context&lt;/STRONG&gt;. Anyone with access to the Power BI report will see the unmasked data, which is a severe &lt;STRONG&gt;security and compliance risk&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Even though the user who created the connection can see unmasked data, the actual identity executing the refresh in the &lt;STRONG&gt;Power BI Service&lt;/STRONG&gt; does not have the &lt;STRONG&gt;UNMASKED&lt;/STRONG&gt; privilege. Power BI dataset refresh credentials are distinct from the person who authored the report. If the dataset is configured to refresh using a Service Principal, a Gateway account or a different user account that lacks the explicit UNMASKED grant, Unity Catalog will dynamically mask the data during the extraction phase.&lt;/P&gt;&lt;P&gt;You can follow below&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Import Mode Refresh Identity&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;Fix&lt;/STRONG&gt; (If Import Mode is &lt;STRONG&gt;required&lt;/STRONG&gt;) - If you must use Import mode for performance reasons, you must ensure the exact identity performing the refresh has the correct privileges and you must restrict report access. Find the&amp;nbsp;&lt;SPAN&gt;exact account (User or Service Principal) being used for OAuth2 authentication under Data Source Credentials and give it relevant access to view unmasked data in report. You can run the Databricks job or Power BI refresh again and the data will now import unmasked.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Because the data is now unmasked in Power BI, you &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;must&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt; apply &lt;STRONG&gt;Power BI Object-Level Security (OLS) or Row-Level Security (RLS)&lt;/STRONG&gt; to hide or restrict the PII columns for general report viewers.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;DirectQuery Recommended- &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;You can &lt;SPAN&gt;move away from Import mode for PII-heavy tables and the users can dynamically view unmasked data based on their privilege in the UC.&amp;nbsp;Configure the Databricks data source in Power BI to use &lt;STRONG&gt;OAuth2 with &lt;/STRONG&gt;SSO.&amp;nbsp;When a user views the report, Power BI passes that specific user’s Entra ID identity to Databricks. Unity Catalog evaluates the Dynamic Data Masking policy. If the user has UNMASKED privilege, they see the data. If they dont, Databricks returns the masked data.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;You can automate the publication of a Power BI report directly from a Databricks Workflow using the Power BI API or the Python client library. However, the publishing mechanism does not dictate the masking.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;You can update the report to use DirectQuery with SSO as it delegates PII governance to Unity Catalog, ensures masking based on the viewer's identity and removes the security burden from Power BI.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2026 04:27:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/158847#M11839</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-06-12T04:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: power BI mask function</title>
      <link>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/158875#M11841</link>
      <description>&lt;P&gt;A couple of points below that I think are worth a clarification on the above answer, which is generally correct.&lt;/P&gt;&lt;P&gt;- There is no such thing as an&amp;nbsp;&lt;STRONG&gt;UNMASKED&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;privilege. If a masking function is applied, it gets executed no matter what. You can be exempt from the masking either in the function itself, or by being in the&amp;nbsp;&lt;STRONG&gt;Except for&lt;/STRONG&gt; clause if using ABAC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Be aware that DirectQuery does not work if you are on AWS on the Databricks side. There is no direct integration between AWS and Microsoft to allow for the user context to come through correctly&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- There are no Power BI native functions that work the same way as a masking function in Databricks. &lt;STRONG&gt;RLS&lt;/STRONG&gt; works on rows, &lt;STRONG&gt;OLS&lt;/STRONG&gt; can only&amp;nbsp;&lt;STRONG&gt;hide&lt;/STRONG&gt; the column not mask it fully/partially.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;TLDR:&amp;nbsp;&lt;/STRONG&gt;If you use Import mode, the data is imported in the security context of the user used for the refresh - this determines masking. DirectQuery can execute the query on behalf of the user directly. Usually DirectQuery means a bit of a performance hit on the Power BI side + added cost on the Databricks side as well.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2026 12:46:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/158875#M11841</guid>
      <dc:creator>KrisJohannesen</dc:creator>
      <dc:date>2026-06-12T12:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: power BI mask function</title>
      <link>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/158895#M11842</link>
      <description>&lt;P&gt;Hi thanks for your response,&lt;BR /&gt;More context, I cannot use direct query is a very heavy dataset. I use import mode, of course I know in import mode the dataset keeps the masking if the user who publish is not exempt of it. I am testing to skip this using a job where the task is a power bi refresh, using the connection of a user who can see the data unmasked but is not working, the report is still masked.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2026 15:03:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/158895#M11842</guid>
      <dc:creator>carlos_tasayco</dc:creator>
      <dc:date>2026-06-12T15:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: power BI mask function</title>
      <link>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/159044#M11851</link>
      <description>&lt;DIV id="bodyDisplay_3" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I've done some research on this and I think you maybe updating the credentials in the wrong place. It's slightly confusing but when you update a power bi dashboard it uses the credentials in the Power BI connection set up not the job credentials.&amp;nbsp;&lt;/P&gt;
&lt;OL class="css-0"&gt;
&lt;LI&gt;Go to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Power BI Service → Settings → Dataset → Data Source Credentials&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;Change the authentication to use a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Service Principal&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;user account&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that is explicitly exempt from the masking function in Unity Catalog.&lt;/LI&gt;
&lt;LI&gt;In Databricks, ensure that identity is lwill not be applied to this user.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;After updating credentials, refresh the dataset — the data should now import unmasked&lt;/P&gt;
&lt;P&gt;Worth also noting that the recommended way to respect RLS with Power BI is to use Direct Query. When you say the dataset is too big. If your queries and tables are structured correctly then it should handle it better as you're using the power of spark sql to aggregate the data rather than Power BI.&amp;nbsp; Unless you are actually needing to pull the detailed dataset into the dashboard with each query, but this is rarely needed. It's definitely worth some more testing on this.&lt;/P&gt;
&lt;P&gt;Linking to docs for reference&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-query/connectors/databricks-azure" rel="nofollow noopener noreferrer" target="_blank"&gt;https://learn.microsoft.com/en-us/power-query/connectors/databricks-azure&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Emma&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="messagemediasnippetlist_3" class="lia-media-snippet-container lia-component-media-snippet lia-component-message-view-widget-media-snippet"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 Jun 2026 13:32:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/power-bi-mask-function/m-p/159044#M11851</guid>
      <dc:creator>emma_s</dc:creator>
      <dc:date>2026-06-15T13:32:40Z</dc:date>
    </item>
  </channel>
</rss>

