<?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: AADToken from react custom visual in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/AADToken-from-react-custom-visual/m-p/5147407#M64865</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1574330"&gt;@jananigurusamy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for raising this in Microsoft Fabric Community.&lt;/P&gt;
&lt;P&gt;Publishing a visual to AppSource by itself is not sufficient for acquireAADToken() to work. Based on the official documentation, the API is supported only for AppSource visuals that are approved, and in other contexts such as organizational or uncertified visuals it can return PrivilegeStatus.NotSupported, which aligns with what you are seeing.&lt;/P&gt;
&lt;P&gt;You can refer to the documentation here:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/authentication-api" target="_blank"&gt;The authentication API in Power BI custom visuals - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This mentions that the Authentication API applies to AppSource visuals and may return NotSupported when the visual is not in a supported state.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the same time, there are some constraints around certification to be aware of. Certified visuals are required to follow strict validation rules, including limitations around external service calls. Because of this, scenarios where a visual needs to pass the user’s AAD token to an external API may be difficult to align with certification requirements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In similar discussions, one approach that is considered is to handle authentication outside of the custom visual. For example, the visual can call a backend service, and that service can manage authentication (for instance using a service principal or managed identity) before calling the external API. This helps avoid relying on token acquisition within the visual itself.&lt;/P&gt;
&lt;P&gt;You may find this related discussion useful:&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Using-the-Power-BI-Authentication-API-returns-accessToken-null/m-p/3885538" target="_blank"&gt;Using the Power BI Authentication API returns acce... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If your requirement depends on user-context access, it might be worth exploring whether a backend-mediated approach would fit your scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Please reach out for further assistance.&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Apr 2026 07:05:03 GMT</pubDate>
    <dc:creator>v-veshwara-msft</dc:creator>
    <dc:date>2026-04-13T07:05:03Z</dc:date>
    <item>
      <title>AADToken from react custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/AADToken-from-react-custom-visual/m-p/5146682#M64861</link>
      <description>&lt;P&gt;Building react custom visual which should generate user token and pass it to external API on some user action in visual. But am getting&amp;nbsp;&lt;SPAN&gt;PrivilegeStatus&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;NotSupported in&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;acquireAADTokenstatus(). Uploaded visual into organizational visuals as well, it is not working. I am seeing like publishing to AppSource is the only option. But cannot be certified because custom will need to make external API call. Token status will be allowed only if ceritifed or publishing to AppSource is enough?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2026 13:16:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/AADToken-from-react-custom-visual/m-p/5146682#M64861</guid>
      <dc:creator>jananigurusamy</dc:creator>
      <dc:date>2026-04-10T13:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: AADToken from react custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/AADToken-from-react-custom-visual/m-p/5147407#M64865</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1574330"&gt;@jananigurusamy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for raising this in Microsoft Fabric Community.&lt;/P&gt;
&lt;P&gt;Publishing a visual to AppSource by itself is not sufficient for acquireAADToken() to work. Based on the official documentation, the API is supported only for AppSource visuals that are approved, and in other contexts such as organizational or uncertified visuals it can return PrivilegeStatus.NotSupported, which aligns with what you are seeing.&lt;/P&gt;
&lt;P&gt;You can refer to the documentation here:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/authentication-api" target="_blank"&gt;The authentication API in Power BI custom visuals - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This mentions that the Authentication API applies to AppSource visuals and may return NotSupported when the visual is not in a supported state.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the same time, there are some constraints around certification to be aware of. Certified visuals are required to follow strict validation rules, including limitations around external service calls. Because of this, scenarios where a visual needs to pass the user’s AAD token to an external API may be difficult to align with certification requirements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In similar discussions, one approach that is considered is to handle authentication outside of the custom visual. For example, the visual can call a backend service, and that service can manage authentication (for instance using a service principal or managed identity) before calling the external API. This helps avoid relying on token acquisition within the visual itself.&lt;/P&gt;
&lt;P&gt;You may find this related discussion useful:&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Using-the-Power-BI-Authentication-API-returns-accessToken-null/m-p/3885538" target="_blank"&gt;Using the Power BI Authentication API returns acce... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If your requirement depends on user-context access, it might be worth exploring whether a backend-mediated approach would fit your scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Please reach out for further assistance.&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2026 07:05:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/AADToken-from-react-custom-visual/m-p/5147407#M64865</guid>
      <dc:creator>v-veshwara-msft</dc:creator>
      <dc:date>2026-04-13T07:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: AADToken from react custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/AADToken-from-react-custom-visual/m-p/5148032#M64875</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Answer -&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The behavior you are seeing (PrivilegeStatus.NotSupported from acquireAADTokenStatus()) is by design and aligns with Microsoft’s documented limitations of the Power BI Authentication API.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The Power BI Authentication API (AcquireAADTokenService) can be used only by visuals published to AppSource.&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;It is not supported for:&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Private visuals (pbiviz uploads)&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;Organizational visuals&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN&gt;Even if the visual is uploaded to Organizational visuals and tenant settings are enabled, the API remains unsupported, and the status will be returned as NotSupported.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is explicitly stated in Microsoft documentation, which notes that the Authentication API is applicable only for AppSource visuals and not for private visuals&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;NOTE -&amp;nbsp;Organizational visuals are still considered &lt;I&gt;private visuals from the Authentication API perspective.&amp;nbsp;&lt;/I&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;SPAN&gt;Document link -&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/authentication-api" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/power-bi/developer/visuals/authentication-api&lt;/A&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To clarify a common confusion:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Publishing the visual to AppSource is mandatory to use acquireAADToken()&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Certification is NOT required&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;If your visual calls an external API, it cannot be certified, but it can still be published to AppSource as a non‑certified custom visual.&amp;nbsp;Once published to AppSource, the Authentication API becomes available.&amp;nbsp;Microsoft documentation confirms that certification is optional, and visuals that connect to external services simply do not qualify for certification, but are otherwise supported in AppSource&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Documentation Link -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/power-bi-custom-visuals-certified" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/power-bi/developer/visuals/power-bi-custom-visuals-certified&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Even after publishing to AppSource, the token will only be issued if the Power BI tenant admin enables the following setting:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tenant setting:&amp;nbsp;AppSource Custom Visuals SSO&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this setting is disabled, the status may return DisabledByAdmin.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the visual is not from AppSource, the status will return NotSupported regardless of this setting.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This tenant requirement is documented under Power BI visuals admin settings.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this helps. Please mark this reply as the solution if it answers your question.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 14 Apr 2026 04:09:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/AADToken-from-react-custom-visual/m-p/5148032#M64875</guid>
      <dc:creator>Ray_Minds</dc:creator>
      <dc:date>2026-04-14T04:09:24Z</dc:date>
    </item>
  </channel>
</rss>

