<?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 Windows Authentication with Custom Connector in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Windows-Authentication-with-Custom-Connector/m-p/3900260#M52223</link>
    <description>&lt;P&gt;Trying to create a pretty simple custom connector for Power BI. .pq code is listed below and I have attached the .mez file. The idea for the connector is to connect to a folder and pull back all of the files in the folder (CSV files) and allow you to choose which files you want and each becomes its own query. The current problem I have is that my Windows credentials are not associating with my selected folder. So, when I use the connector the following happens:&lt;/P&gt;
&lt;P&gt;1. Prompts me for a folder path&lt;/P&gt;
&lt;P&gt;2. Prompts me for credentials&lt;/P&gt;
&lt;P&gt;3. Errors and tells me I need to provide credentials or "Please specifyhow to connect"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Greg_Deckler_0-1715120780818.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1093691i9797045BC575466E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Greg_Deckler_0-1715120780818.png" alt="Greg_Deckler_0-1715120780818.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm sure it's something silly and easy but I can't figure it out.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// This file contains your Data Connector logic
[Version = "1.0.0"]
section TDGTPQM_FolderFile;

TDGTPQM_FolderFile.GetFile = ( filePath as text) as table =&amp;gt;
    let
        output = Csv.Document(File.Contents(filePath),[Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.None])
    in
        output;


[DataSource.Kind="TDGTPQM_FolderFile", Publish="TDGTPQM_FolderFile.Publish"]
shared TDGTPQM_FolderFile.Contents = ( folder as text ) =&amp;gt;
    let
        //Credential = Extension.CurrentCredential(),
        files = 
            Table.DuplicateColumn(
                Table.CombineColumns(
                    Table.SelectColumns(
                        Folder.Contents( folder ),
                        { "Name", "Folder Path"}
                    ),
                    { "Folder Path", "Name" }, 
                    Combiner.CombineTextByDelimiter("", QuoteStyle.None), 
                    "Name"
                ),
                "Name",
                "Key"
            ),
        addDataColumn = Table.AddColumn( files, "Data", each TDGTPQM_FolderFile.GetFile([Key])),
        addItemKindColumn = Table.AddColumn( addDataColumn, "ItemKind", each "Table"),
        addItemNameColumn = Table.AddColumn( addItemKindColumn, "ItemName", each "Table"),
        addIsLeafColumn = Table.AddColumn( addItemNameColumn, "IsLeaf", each true),
        Navigation = Table.ToNavigationTable( addIsLeafColumn, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
    in
        Navigation;

// Data Source Kind description
TDGTPQM_FolderFile = [
    TestConnection = ( dataSourcePath ) =&amp;gt; { "TDGTPQM_FolderFile.Contents" },
    Authentication = [
        // Key = [],
        //UsernamePassword = [],
        Windows = [ SupportsAlternateCredentials = true ]
        //Anonymous = []
    ]
];

// Data Source UI publishing description
TDGTPQM_FolderFile.Publish = [
    Beta = true,
    Category = "Other",
    ButtonText = { Extension.LoadString("ButtonTitle"), Extension.LoadString("ButtonHelp") },
    LearnMoreUrl = "https://powerbi.microsoft.com/",
    SourceImage = TDGTPQM_FolderFile.Icons,
    SourceTypeImage = TDGTPQM_FolderFile.Icons
];

TDGTPQM_FolderFile.Icons = [
    Icon16 = { Extension.Contents("TDGTPQM_FolderFile16.png"), Extension.Contents("TDGTPQM_FolderFile20.png"), Extension.Contents("TDGTPQM_FolderFile24.png"), Extension.Contents("TDGTPQM_FolderFile32.png") },
    Icon32 = { Extension.Contents("TDGTPQM_FolderFile32.png"), Extension.Contents("TDGTPQM_FolderFile40.png"), Extension.Contents("TDGTPQM_FolderFile48.png"), Extension.Contents("TDGTPQM_FolderFile64.png") }
];

Table.ToNavigationTable = (
    table as table,
    keyColumns as list,
    nameColumn as text,
    dataColumn as text,
    itemKindColumn as text,
    itemNameColumn as text,
    isLeafColumn as text
) as table =&amp;gt;
    let
        tableType = Value.Type(table),
        newTableType = Type.AddTableKey(tableType, keyColumns, true) meta 
        [
            NavigationTable.NameColumn = nameColumn, 
            NavigationTable.DataColumn = dataColumn,
            NavigationTable.ItemKindColumn = itemKindColumn, 
            Preview.DelayColumn = itemNameColumn, 
            NavigationTable.IsLeafColumn = isLeafColumn
        ],
        navigationTable = Value.ReplaceType(table, newTableType)
    in
        navigationTable;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 May 2024 22:29:08 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2024-05-07T22:29:08Z</dc:date>
    <item>
      <title>Windows Authentication with Custom Connector</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Windows-Authentication-with-Custom-Connector/m-p/3900260#M52223</link>
      <description>&lt;P&gt;Trying to create a pretty simple custom connector for Power BI. .pq code is listed below and I have attached the .mez file. The idea for the connector is to connect to a folder and pull back all of the files in the folder (CSV files) and allow you to choose which files you want and each becomes its own query. The current problem I have is that my Windows credentials are not associating with my selected folder. So, when I use the connector the following happens:&lt;/P&gt;
&lt;P&gt;1. Prompts me for a folder path&lt;/P&gt;
&lt;P&gt;2. Prompts me for credentials&lt;/P&gt;
&lt;P&gt;3. Errors and tells me I need to provide credentials or "Please specifyhow to connect"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Greg_Deckler_0-1715120780818.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1093691i9797045BC575466E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Greg_Deckler_0-1715120780818.png" alt="Greg_Deckler_0-1715120780818.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm sure it's something silly and easy but I can't figure it out.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// This file contains your Data Connector logic
[Version = "1.0.0"]
section TDGTPQM_FolderFile;

TDGTPQM_FolderFile.GetFile = ( filePath as text) as table =&amp;gt;
    let
        output = Csv.Document(File.Contents(filePath),[Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.None])
    in
        output;


[DataSource.Kind="TDGTPQM_FolderFile", Publish="TDGTPQM_FolderFile.Publish"]
shared TDGTPQM_FolderFile.Contents = ( folder as text ) =&amp;gt;
    let
        //Credential = Extension.CurrentCredential(),
        files = 
            Table.DuplicateColumn(
                Table.CombineColumns(
                    Table.SelectColumns(
                        Folder.Contents( folder ),
                        { "Name", "Folder Path"}
                    ),
                    { "Folder Path", "Name" }, 
                    Combiner.CombineTextByDelimiter("", QuoteStyle.None), 
                    "Name"
                ),
                "Name",
                "Key"
            ),
        addDataColumn = Table.AddColumn( files, "Data", each TDGTPQM_FolderFile.GetFile([Key])),
        addItemKindColumn = Table.AddColumn( addDataColumn, "ItemKind", each "Table"),
        addItemNameColumn = Table.AddColumn( addItemKindColumn, "ItemName", each "Table"),
        addIsLeafColumn = Table.AddColumn( addItemNameColumn, "IsLeaf", each true),
        Navigation = Table.ToNavigationTable( addIsLeafColumn, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
    in
        Navigation;

// Data Source Kind description
TDGTPQM_FolderFile = [
    TestConnection = ( dataSourcePath ) =&amp;gt; { "TDGTPQM_FolderFile.Contents" },
    Authentication = [
        // Key = [],
        //UsernamePassword = [],
        Windows = [ SupportsAlternateCredentials = true ]
        //Anonymous = []
    ]
];

// Data Source UI publishing description
TDGTPQM_FolderFile.Publish = [
    Beta = true,
    Category = "Other",
    ButtonText = { Extension.LoadString("ButtonTitle"), Extension.LoadString("ButtonHelp") },
    LearnMoreUrl = "https://powerbi.microsoft.com/",
    SourceImage = TDGTPQM_FolderFile.Icons,
    SourceTypeImage = TDGTPQM_FolderFile.Icons
];

TDGTPQM_FolderFile.Icons = [
    Icon16 = { Extension.Contents("TDGTPQM_FolderFile16.png"), Extension.Contents("TDGTPQM_FolderFile20.png"), Extension.Contents("TDGTPQM_FolderFile24.png"), Extension.Contents("TDGTPQM_FolderFile32.png") },
    Icon32 = { Extension.Contents("TDGTPQM_FolderFile32.png"), Extension.Contents("TDGTPQM_FolderFile40.png"), Extension.Contents("TDGTPQM_FolderFile48.png"), Extension.Contents("TDGTPQM_FolderFile64.png") }
];

Table.ToNavigationTable = (
    table as table,
    keyColumns as list,
    nameColumn as text,
    dataColumn as text,
    itemKindColumn as text,
    itemNameColumn as text,
    isLeafColumn as text
) as table =&amp;gt;
    let
        tableType = Value.Type(table),
        newTableType = Type.AddTableKey(tableType, keyColumns, true) meta 
        [
            NavigationTable.NameColumn = nameColumn, 
            NavigationTable.DataColumn = dataColumn,
            NavigationTable.ItemKindColumn = itemKindColumn, 
            Preview.DelayColumn = itemNameColumn, 
            NavigationTable.IsLeafColumn = isLeafColumn
        ],
        navigationTable = Value.ReplaceType(table, newTableType)
    in
        navigationTable;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 22:29:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Windows-Authentication-with-Custom-Connector/m-p/3900260#M52223</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-05-07T22:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Authentication with Custom Connector</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Windows-Authentication-with-Custom-Connector/m-p/3901706#M52238</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Could you please try the following steps and check if can solve your problem?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Clear all permissions: Go to File &amp;gt; Options and Settings &amp;gt; Data Source Settings &amp;gt; Global Permissions and click on Clear All Permissions.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_0-1715161275073.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1094108iD9798A4E6FACB68A/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_0-1715161275073.png" alt="vyiruanmsft_0-1715161275073.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;Adjust the data extension security settings: In Power BI Desktop, select File &amp;gt; Options and settings &amp;gt; Options &amp;gt; Security. Under Data Extensions, select &lt;EM&gt;(Not Recommended) Allow any extension to load without validation or warning&lt;/EM&gt;. Then, restart Power BI Desktop.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_1-1715161321444.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1094109i4D502FA9900E6ECA/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_1-1715161321444.png" alt="vyiruanmsft_1-1715161321444.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Restart the computer:&amp;nbsp;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://community.fabric.microsoft.com/t5/Developer/Custom-Connector-anonymous-Authentication-issue/m-p/1673612" target="_blank"&gt;Solved: Custom Connector - anonymous Authentication issue&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 09:43:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Windows-Authentication-with-Custom-Connector/m-p/3901706#M52238</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-08T09:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Authentication with Custom Connector</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Windows-Authentication-with-Custom-Connector/m-p/3902335#M52246</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;Thanks but did not work. My fear is that Folder.Contents is not supported:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Custom-connector-for-proprietary-file-type/m-p/497360" target="_blank"&gt;Custom connector for proprietary file type - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 13:17:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Windows-Authentication-with-Custom-Connector/m-p/3902335#M52246</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-05-08T13:17:08Z</dc:date>
    </item>
  </channel>
</rss>

