<?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 Dashboard embed. Requests with 401 in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/200803#M6409</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've successfully embeded dathboard in web app for non power-bi users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Retrieved access token by password grant type:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;POST /common/oauth2/token HTTP/1.1
Host: login.microsoftonline.com
Content-Type: application/x-www-form-urlencoded

grant_type=password&amp;amp;username=user@domain.onmicrosoft.com&amp;amp;password=123456&amp;amp;client_id=asd123-asd345-asd456&amp;amp;resource=https://analysis.windows.net/powerbi/api&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Retrieved dashboard token&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;POST /v1.0/myorg/groups/asd123-asd5556-asdasd564/dashboards/asd345-asd789-asd456/GenerateToken HTTP/1.1
Host: api.powerbi.com
Content-Type: application/json; charset=utf-8
Authorization: Bearer ayJ0eXZAiOiJKX1QiLCJhbGciO...

{"accessLevel": "View"}&lt;/PRE&gt;&lt;P&gt;3. Embeded with JS in client&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;     // Read embed application token from Model
    var accessToken = "&amp;lt;?=$dashboard_token_data['token']?&amp;gt;";

    // Read dashboard Id from Model
    var embedDashboardId = "&amp;lt;?=$dashboard_id?&amp;gt;";

    // Read embed URL from Model
    var embedUrl = 'https://app.powerbi.com/dashboardEmbed';

    // Get models. models contains enums that can be used.
    var models = window['powerbi-client'].models;

    // Embed configuration used to describe the what and how to embed.
    // This object is used when calling powerbi.embed.
    // This also includes settings and options such as filters.
    // You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
    var config = {
        type: 'dashboard',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedDashboardId
    };

    // Get a reference to the embedded dashboard HTML element
    var dashboardContainer = $('#dashboardContainer')[0];

    // Embed the dashboard and display it within the div container.
    var dashboard = powerbi.embed(dashboardContainer, config);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dashboard loads and&amp;nbsp;get updates but following requests failed with 401:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Failed to load resource: the server responded with a status of 401 (Unauthorized)&lt;/TD&gt;&lt;TD&gt;wabi-west-europe-redirect.analysis.windows.net/powerbi/metadata/user/activedashboard/947870&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Failed to load resource: the server responded with a status of 401 (Unauthorized)&lt;/TD&gt;&lt;TD&gt;wabi-west-europe-redirect.analysis.windows.net/powerbi/metadata/models/718093/?modelOptions=Default&amp;amp;packageId=1278570&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Failed to load resource: the server responded with a status of 401 (Unauthorized)&lt;/TD&gt;&lt;TD&gt;wabi-west-europe-redirect.analysis.windows.net/powerbi/metadata/models/718093/?modelOptions=Default&amp;amp;packageId=1278570&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems that it's doesn't&amp;nbsp;affect functionality for now. Just wandering&amp;nbsp;what might be the cause.&lt;/P&gt;</description>
    <pubDate>Sun, 25 Jun 2017 14:59:36 GMT</pubDate>
    <dc:creator>calm1kov</dc:creator>
    <dc:date>2017-06-25T14:59:36Z</dc:date>
    <item>
      <title>Dashboard embed. Requests with 401</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/200803#M6409</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've successfully embeded dathboard in web app for non power-bi users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Retrieved access token by password grant type:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;POST /common/oauth2/token HTTP/1.1
Host: login.microsoftonline.com
Content-Type: application/x-www-form-urlencoded

grant_type=password&amp;amp;username=user@domain.onmicrosoft.com&amp;amp;password=123456&amp;amp;client_id=asd123-asd345-asd456&amp;amp;resource=https://analysis.windows.net/powerbi/api&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Retrieved dashboard token&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;POST /v1.0/myorg/groups/asd123-asd5556-asdasd564/dashboards/asd345-asd789-asd456/GenerateToken HTTP/1.1
Host: api.powerbi.com
Content-Type: application/json; charset=utf-8
Authorization: Bearer ayJ0eXZAiOiJKX1QiLCJhbGciO...

{"accessLevel": "View"}&lt;/PRE&gt;&lt;P&gt;3. Embeded with JS in client&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;     // Read embed application token from Model
    var accessToken = "&amp;lt;?=$dashboard_token_data['token']?&amp;gt;";

    // Read dashboard Id from Model
    var embedDashboardId = "&amp;lt;?=$dashboard_id?&amp;gt;";

    // Read embed URL from Model
    var embedUrl = 'https://app.powerbi.com/dashboardEmbed';

    // Get models. models contains enums that can be used.
    var models = window['powerbi-client'].models;

    // Embed configuration used to describe the what and how to embed.
    // This object is used when calling powerbi.embed.
    // This also includes settings and options such as filters.
    // You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
    var config = {
        type: 'dashboard',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedDashboardId
    };

    // Get a reference to the embedded dashboard HTML element
    var dashboardContainer = $('#dashboardContainer')[0];

    // Embed the dashboard and display it within the div container.
    var dashboard = powerbi.embed(dashboardContainer, config);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dashboard loads and&amp;nbsp;get updates but following requests failed with 401:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Failed to load resource: the server responded with a status of 401 (Unauthorized)&lt;/TD&gt;&lt;TD&gt;wabi-west-europe-redirect.analysis.windows.net/powerbi/metadata/user/activedashboard/947870&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Failed to load resource: the server responded with a status of 401 (Unauthorized)&lt;/TD&gt;&lt;TD&gt;wabi-west-europe-redirect.analysis.windows.net/powerbi/metadata/models/718093/?modelOptions=Default&amp;amp;packageId=1278570&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Failed to load resource: the server responded with a status of 401 (Unauthorized)&lt;/TD&gt;&lt;TD&gt;wabi-west-europe-redirect.analysis.windows.net/powerbi/metadata/models/718093/?modelOptions=Default&amp;amp;packageId=1278570&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems that it's doesn't&amp;nbsp;affect functionality for now. Just wandering&amp;nbsp;what might be the cause.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2017 14:59:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/200803#M6409</guid>
      <dc:creator>calm1kov</dc:creator>
      <dc:date>2017-06-25T14:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard embed. Requests with 401</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/201916#M6443</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="4365" data-lia-user-login="calm1kov" class="lia-mention lia-mention-user"&gt;calm1kov&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I can confirm the 401 errors when embedding reports or dashboards. However the reports/dashboards can be rendered without problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides embedding, even when I access Power BI.com and view my reports, I would see 40x and 50x errors in the console as well. I'd guess it is something wrong with the Power BI azure structure, however as long as &amp;nbsp;those errors don't affect my reports, I just leave them alone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more clarification, I think you can submit a support ticket.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 07:38:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/201916#M6443</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-06-27T07:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard embed. Requests with 401</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/670846#M19135</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting&amp;nbsp;a same error&amp;nbsp;Failed to load resource: the server responded with a status of 401 when I try to open dashboard URL in new tab&amp;nbsp;&lt;A href="https://app.powerbi.com/dashboardEmbed?dashboardId=100114d8-9c7c-4ae1-b1d5-291603b4f22c&amp;amp;config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly9XQUJJLVVLLVNPVVRILUItUFJJTUFSWS1yZWRpcmVjdC5hbmFseXNpcy53aW5kb3dzLm5ldCJ9" target="_blank"&gt;https://app.powerbi.com/dashboardEmbed?dashboardId=100114d8-9c7c-4ae1-b1d5-291603b4f22c&amp;amp;config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly9XQUJJLVVLLVNPVVRILUItUFJJTUFSWS1yZWRpcmVjdC5hbmFseXNpcy53aW5kb3dzLm5ldCJ9&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works fine on localhost sample dashboard app (C# visual studio 2017)&lt;/P&gt;&lt;P&gt;I am also getting this error on console for&amp;nbsp;&lt;A href="https://api.powerbi.com/powerbi/metadata/refreshusermetadata" target="_blank"&gt;https://api.powerbi.com/powerbi/metadata/refreshusermetadata&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When i open this link it shows message. See the screenshot below :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dashboard URL should also work on a new tab too because I want to use this link into another website&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me, I am trying to find a solution for this now for two days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 08:39:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/670846#M19135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-16T08:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard embed. Requests with 401</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/2295888#M34000</link>
      <description>&lt;P&gt;I am going through the same issue here.. getting&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;powerbi/metadata/refreshusermetadata 400 error when trying to embed a dashboard.&lt;/P&gt;&lt;P&gt;Reports load just fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did anyone figure out the solution for this?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 15:22:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/2295888#M34000</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-21T15:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard embed. Requests with 401</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/2296587#M34004</link>
      <description>&lt;P&gt;Same issue here. Trying to embed dashboard, seems to render the dashboard but pinned tile is not updated.&lt;BR /&gt;Getting same 400 error in console&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Seems like 'loaded' event is triggered but not 'rendered' or 'error'.&lt;/P&gt;&lt;P&gt;Has anyone got Tiles to update in a embeded dashboard. Works fine from&amp;nbsp;app.powerbi.com (using push dataset)&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 13:55:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/2296587#M34004</guid>
      <dc:creator>LarsNordqvist</dc:creator>
      <dc:date>2022-01-22T13:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard embed. Requests with 401</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/2307421#M34115</link>
      <description>&lt;P&gt;We are facing the same problem, we have an open support ticket with Microsoft. This only started occurring for us last week where dashbaord tiles no longer update for embedded dashboards, but continue to work correctly inside the Power BI service.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 10:41:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/2307421#M34115</guid>
      <dc:creator>RWH</dc:creator>
      <dc:date>2022-01-28T10:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard embed. Requests with 401</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/3225849#M42577</link>
      <description>&lt;P&gt;I am having the same exact problem right now. Has anyone found a solution?&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 00:46:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dashboard-embed-Requests-with-401/m-p/3225849#M42577</guid>
      <dc:creator>DMiradakis</dc:creator>
      <dc:date>2023-05-09T00:46:41Z</dc:date>
    </item>
  </channel>
</rss>

