<?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: Cannot create Push Dataset in Group in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-Push-Dataset-in-Group/m-p/2025039#M31213</link>
    <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you &lt;A href="https://docs.microsoft.com/en-au/dynamics365/business-central/dev-itpro/api-reference/v2.0/enabling-apis-for-dynamics-nav#enable-access-to-the-apis" target="_self"&gt;enable&amp;nbsp;&lt;SPAN&gt;Business Central&amp;nbsp;&lt;/SPAN&gt;access to the APIs&lt;/A&gt;?&lt;/P&gt;
&lt;P&gt;Please check out&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-au/dynamics365/business-central/admin-powerbi-setup#set-up-prod_short-on-premises-for-power-bi-integration" target="_self"&gt;Business Central on-premises for Power BI integration&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Liang&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Aug 2021 06:17:48 GMT</pubDate>
    <dc:creator>V-lianl-msft</dc:creator>
    <dc:date>2021-08-19T06:17:48Z</dc:date>
    <item>
      <title>Cannot create Push Dataset in Group</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-Push-Dataset-in-Group/m-p/2021126#M31182</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a Dataset using Power BI API.&lt;/P&gt;&lt;P&gt;As Datasource I want to chose the OData Query from Business Central.&lt;/P&gt;&lt;P&gt;However, OData requires credentials, and I am not sure where I can provide them.&lt;/P&gt;&lt;P&gt;I am using the code from "Embed for Customers" example and Service Principal as authentication method.&lt;/P&gt;&lt;P&gt;Will provide some of the code below (some lines are commented out since I am experimenting):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public async Task AddDatasetAsync(Guid workspaceId, AddDatasetDto datasetDto)
        {
            using (var pbiClient = await GetPowerBiClient())
            {
                var request = new CreateDatasetRequest
                {
                    Datasources = new List&amp;lt;Datasource&amp;gt;
                    {
                        new Datasource
                        {
                            //ConnectionDetails = new DatasourceConnectionDetails(),
                            //ConnectionString = datasetDto.ConnectionString,
                            DatasourceType = "OData",
                            Name = "Dynamics365BusinessCentral",
                            ConnectionDetails = new DatasourceConnectionDetails
                            {
                                //Database = datasetDto.Database,
                                //Server = datasetDto.Server,
                                Url = datasetDto.Url
                            }
                        }
                    },
                    //DefaultMode = DatasetMode.Streaming,
                    Name = datasetDto.DatasetName,
                    Tables = new List&amp;lt;Table&amp;gt;()
                    //Tables = new List&amp;lt;Table&amp;gt;
                    //{
                    //    new Table
                    //    {
                    //        Source = new List&amp;lt;ASMashupExpression&amp;gt;
                    //        {
                    //            new ASMashupExpression
                    //            {
                    //                Expression = ""
                    //            }
                    //        }
                    //    }
                    //}
                };

                await pbiClient.Datasets.PostDatasetInGroupAsync(workspaceId, request);
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The client itself is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public async Task&amp;lt;PowerBIClient&amp;gt; GetPowerBiClient()
        {
            var tokenCredentials = new TokenCredentials(await aadService.GetAccessToken(), "Bearer");
            return new PowerBIClient(new Uri(urlPowerBiServiceApiRoot), tokenCredentials);
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to post a Dataset by providing "Url" property, in which I put OData query link.&lt;/P&gt;&lt;P&gt;However, every time I try to post a Dataset I get "BadRequest" error.&lt;/P&gt;&lt;P&gt;Clearly I do not specify credentials (it's using Basic Auth - Web Access Key).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you help with this issue?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 12:15:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-Push-Dataset-in-Group/m-p/2021126#M31182</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-17T12:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create Push Dataset in Group</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-Push-Dataset-in-Group/m-p/2025039#M31213</link>
      <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you &lt;A href="https://docs.microsoft.com/en-au/dynamics365/business-central/dev-itpro/api-reference/v2.0/enabling-apis-for-dynamics-nav#enable-access-to-the-apis" target="_self"&gt;enable&amp;nbsp;&lt;SPAN&gt;Business Central&amp;nbsp;&lt;/SPAN&gt;access to the APIs&lt;/A&gt;?&lt;/P&gt;
&lt;P&gt;Please check out&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-au/dynamics365/business-central/admin-powerbi-setup#set-up-prod_short-on-premises-for-power-bi-integration" target="_self"&gt;Business Central on-premises for Power BI integration&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Liang&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 06:17:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-Push-Dataset-in-Group/m-p/2025039#M31213</guid>
      <dc:creator>V-lianl-msft</dc:creator>
      <dc:date>2021-08-19T06:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create Push Dataset in Group</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-Push-Dataset-in-Group/m-p/2032255#M31277</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/182446"&gt;@V-lianl-msft&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for a reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Business Central in cloud and OData Services are already enabled.&lt;/P&gt;&lt;P&gt;I can get data from OData Queries, however I need to provide credentials - currently its Username and API Key.&lt;/P&gt;&lt;P&gt;I can do it in browser in a popup window or specify in Power BI Desktop when chosing data source.&lt;/P&gt;&lt;P&gt;However, I cannot find how can I do this via Power BI REST API.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 12:36:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-Push-Dataset-in-Group/m-p/2032255#M31277</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-23T12:36:30Z</dc:date>
    </item>
  </channel>
</rss>

