<?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 GenerateToken REST API returns 400 if I include customData in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/GenerateToken-REST-API-returns-400-if-I-include-customData/m-p/483687#M14843</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I am developing a proof-of-concept Javascript app to test RLS with customdata (i.e., the app owns data scenario).&lt;/P&gt;&lt;P&gt;I have a model deployed on an on-premises Analysis Service server accessible through an on-premises gateway. Such a model is accessed by a PowerBI report (live connection) which is successfully published on a custom workspace (say "Workspace A") on app.powerbi.com. If I try to embed the report on the javascript app &lt;STRONG&gt;without&lt;/STRONG&gt; specifying any custom data, I can succesfully get the embed token by POSTing to the ..../GenerateToken REST API, but if I try to specify any customData I get the following 400 error (redacted):&lt;/P&gt;&lt;PRE&gt;"error": {
      "code": "InvalidRequest",
      "message": "Dataset 3....e doesn't support providing CustomData in effective identity"
}&lt;/PRE&gt;&lt;P&gt;The api call is:&lt;/P&gt;&lt;PRE&gt;          `/groups/${workspaceId}/reports/${reportId}/GenerateToken`,
          {
            method: 'POST',
            data: {
              "accessLevel": "View",
              'identities': [
                {
                  username: "myusername",
                  customData: 'some string',
                  roles: ["examplerolename"],
                  datasets: ["report_dataset_id"],
                },
              ]
            }
          })&lt;/PRE&gt;&lt;P&gt;Does anyone know what I am doing wrong?&lt;/P&gt;&lt;P&gt;Thanks for your support!&lt;/P&gt;</description>
    <pubDate>Wed, 08 Aug 2018 09:14:50 GMT</pubDate>
    <dc:creator>yp</dc:creator>
    <dc:date>2018-08-08T09:14:50Z</dc:date>
    <item>
      <title>GenerateToken REST API returns 400 if I include customData</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/GenerateToken-REST-API-returns-400-if-I-include-customData/m-p/483687#M14843</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I am developing a proof-of-concept Javascript app to test RLS with customdata (i.e., the app owns data scenario).&lt;/P&gt;&lt;P&gt;I have a model deployed on an on-premises Analysis Service server accessible through an on-premises gateway. Such a model is accessed by a PowerBI report (live connection) which is successfully published on a custom workspace (say "Workspace A") on app.powerbi.com. If I try to embed the report on the javascript app &lt;STRONG&gt;without&lt;/STRONG&gt; specifying any custom data, I can succesfully get the embed token by POSTing to the ..../GenerateToken REST API, but if I try to specify any customData I get the following 400 error (redacted):&lt;/P&gt;&lt;PRE&gt;"error": {
      "code": "InvalidRequest",
      "message": "Dataset 3....e doesn't support providing CustomData in effective identity"
}&lt;/PRE&gt;&lt;P&gt;The api call is:&lt;/P&gt;&lt;PRE&gt;          `/groups/${workspaceId}/reports/${reportId}/GenerateToken`,
          {
            method: 'POST',
            data: {
              "accessLevel": "View",
              'identities': [
                {
                  username: "myusername",
                  customData: 'some string',
                  roles: ["examplerolename"],
                  datasets: ["report_dataset_id"],
                },
              ]
            }
          })&lt;/PRE&gt;&lt;P&gt;Does anyone know what I am doing wrong?&lt;/P&gt;&lt;P&gt;Thanks for your support!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 09:14:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/GenerateToken-REST-API-returns-400-if-I-include-customData/m-p/483687#M14843</guid>
      <dc:creator>yp</dc:creator>
      <dc:date>2018-08-08T09:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: GenerateToken REST API returns 400 if I include customData</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/GenerateToken-REST-API-returns-400-if-I-include-customData/m-p/484975#M14887</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/76056"&gt;@yp&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm afraid the Custom Data isn't supported in your scenario. Please refer to the light blue note in this&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security#working-with-analysis-services-live-connections" target="_self"&gt;embedded-row-level-security#working-with-analysis-services-live-connections&lt;/A&gt;. If you want this feature, I would suggest you create an idea &lt;A href="https://ideas.powerbi.com/forums/265200-power-bi-ideas" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt;The CustomData feature will only work for models that reside in &lt;STRONG&gt;Azure Analysis Services&lt;/STRONG&gt;, and it only works in live mode.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Dale&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 08:50:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/GenerateToken-REST-API-returns-400-if-I-include-customData/m-p/484975#M14887</guid>
      <dc:creator>v-jiascu-msft</dc:creator>
      <dc:date>2018-08-09T08:50:21Z</dc:date>
    </item>
  </channel>
</rss>

