<?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: Custom data connector and Windows authentication in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-and-Windows-authentication/m-p/1713457#M28303</link>
    <description>&lt;P&gt;I'm facing a similar problem , only in my case I using Xml instead of Excel.&lt;/P&gt;&lt;P&gt;When testing my connector in Visual Studio, the "M Query Output" Error tab show this error:&lt;/P&gt;&lt;P&gt;"Credentials are required to connect to the&amp;nbsp; &amp;lt;ConnectorName&amp;gt; source. (Source: from c:\temp\file.xml to &amp;lt;ConnectorName&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When testing the connector in Power BI, getting this error:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Please specify how to connect"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This thread is 7 months old. Please advise...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Mar 2021 10:45:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-03-10T10:45:21Z</dc:date>
    <item>
      <title>Custom data connector and Windows authentication</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-and-Windows-authentication/m-p/1354280#M25599</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to build a custom data connector that lets users navigate a folder structure on the local machine/network and import selected Excel Tables into PBI. The below example line "source = Excel.Workbook(File.Contents(url), null, true)" works without a problem using Windows authentication with "Use my current credentials" when executed directly in a Power BI Desktop query. However, when executed from within my custom data connector I receive the error message "Please specify how to connect" in the Connection dialog in PBI:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[DataSource.Kind="PQExtension1", Publish="PQExtension1.Publish"]&lt;BR /&gt;shared PQExtension1.File = (path as text) as table =&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;&amp;nbsp; &amp;nbsp;source = Excel.Workbook(File.Contents(path), null, true)&lt;BR /&gt;in&lt;BR /&gt;&amp;nbsp; &amp;nbsp;source;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data Source Kind is configured like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PQExtension1 = [&amp;nbsp;Authentication = [&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Windows = [&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // This key brings up the 'Use current credentials' and 'User Name' etc. edit boxes in the credential dialog in PBI&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SupportsAlternateCredentials = true ]&amp;nbsp;],&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Label = Extension.LoadString("DataSourceLabel") ];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note, that it fails with the same error message also if I supply a user name and password instead for authentication.&lt;/P&gt;&lt;P&gt;I have also tried to send the current credentials to the File.Contents method&amp;nbsp;File.Contents(path, Extension.CurrentCredential()). But this only results in the error "2 arguments supplied to a function that only expects one" - even though the documentation clearly states that File.Contents can accept a record as a second parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing? I would be realy grateful if somebody could help me out with this authentication problem!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Edit&lt;/STRONG&gt; :: I found the following text in the documentation at &lt;A href="https://docs.microsoft.com/en-us/power-query/handlingdataaccess#data-source-kind" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/power-query/handlingdataaccess#data-source-kind&lt;/A&gt;:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Currently, a limited set of data source functions have been enabled to support extensibility.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://docs.microsoft.com/en-us/powerquery-m/web-contents" target="_blank" rel="noopener"&gt;Web.Contents&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.microsoft.com/en-us/powerquery-m/odata-feed" target="_blank" rel="noopener"&gt;OData.Feed&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.microsoft.com/en-us/powerquery-m/odbc-datasource" target="_blank" rel="noopener"&gt;Odbc.DataSource&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.microsoft.com/en-us/powerquery-m/adodotnet-datasource" target="_blank" rel="noopener"&gt;AdoDotNet.DataSource&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.microsoft.com/en-us/powerquery-m/oledb-datasource" target="_blank" rel="noopener"&gt;OleDb.DataSource&lt;/A&gt;&amp;nbsp;"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So the basic data access functions, such as File.Contents(), are not supported for data connectors...?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 08:29:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-and-Windows-authentication/m-p/1354280#M25599</guid>
      <dc:creator>thoBA</dc:creator>
      <dc:date>2020-09-14T08:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Custom data connector and Windows authentication</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-and-Windows-authentication/m-p/1713457#M28303</link>
      <description>&lt;P&gt;I'm facing a similar problem , only in my case I using Xml instead of Excel.&lt;/P&gt;&lt;P&gt;When testing my connector in Visual Studio, the "M Query Output" Error tab show this error:&lt;/P&gt;&lt;P&gt;"Credentials are required to connect to the&amp;nbsp; &amp;lt;ConnectorName&amp;gt; source. (Source: from c:\temp\file.xml to &amp;lt;ConnectorName&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When testing the connector in Power BI, getting this error:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Please specify how to connect"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This thread is 7 months old. Please advise...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 10:45:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-and-Windows-authentication/m-p/1713457#M28303</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-10T10:45:21Z</dc:date>
    </item>
  </channel>
</rss>

