<?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 Prompt Credentials in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Prompt-Credentials/m-p/1501536#M26512</link>
    <description>&lt;P&gt;Hi did you find any method to pass url as parameter&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 10:07:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-18T10:07:36Z</dc:date>
    <item>
      <title>Custom Data Connector Prompt Credentials</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Prompt-Credentials/m-p/689725#M19371</link>
      <description>&lt;P&gt;Hey guys,&lt;BR /&gt;I'm building a custom data connector to gets data from an Rest API that doesn't support OAuth, and i was wondering if it is possible for the user to be prompted for some info, like the &lt;STRONG&gt;Base_Url&lt;/STRONG&gt; and an &lt;STRONG&gt;Auth_Key &lt;/STRONG&gt;on the first use, and then store that info in a text file. Then the connector would read from that file everytime. The prompt could always appear, but if it was pre-filled, that would be awesome.&lt;/P&gt;&lt;P&gt;I made the part that reads from the text file, but i can't figure out a way to make the "user input first" approach, work.&lt;BR /&gt;Is there any way to make that using the credentials part of the connector, maybe?&lt;BR /&gt;My connector logic is:&lt;/P&gt;&lt;PRE&gt;GetTable = (ID as text, Params as text) as table =&amp;gt;
    let
        authKey = LoadFromResource("Auth_Key"), // file Auth_Key.txt
        url =  LoadFromResource("BaseUrl") &amp;amp; "?id=" &amp;amp; ID &amp;amp; "&amp;amp;params=" &amp;amp; Params, // file BaseUrl.txt
        options = [Headers=[auth_key= authKey, #"Content-Type"="application/Json"]], 
        source = Json.Document(Web.Contents(url, options)),
        toRecords = Table.FromRecords(source),
        expanded = ExpandAllRecords(toRecords)
     in
        expanded;

[DataSource.Kind="Test1", Publish="Test1.Publish"]
shared Test1.Contents = (ID as text, Params as text) =&amp;gt; 
     let    
          source = GetTable(ID, Params)
     in
          source;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 09:47:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Prompt-Credentials/m-p/689725#M19371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-13T09:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Data Connector Prompt Credentials</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Prompt-Credentials/m-p/689921#M19373</link>
      <description>&lt;P&gt;Update: i figured out how to prompt only once for the &lt;STRONG&gt;auth_key&lt;/STRONG&gt;:&lt;/P&gt;&lt;PRE&gt;authKey = Extension.CurrentCredential()[Key] &lt;/PRE&gt;&lt;P&gt;Instead of that LoadFromResource. This way it prompts the user for the key on the first time, and then it stores in PBI, even if you clean the cache.&lt;BR /&gt;&lt;BR /&gt;You have to change this aswell:&lt;/P&gt;&lt;PRE&gt;Teste1 = [
    Authentication = [
        Key = 
[
            Label = " "
] 
    ],
    Label = Extension.LoadString("DataSourceLabel")
];&lt;/PRE&gt;&lt;P&gt;Now i'll keep trying for the Base URL.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 14:25:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Prompt-Credentials/m-p/689921#M19373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-04T14:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Data Connector Prompt Credentials</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Prompt-Credentials/m-p/1501536#M26512</link>
      <description>&lt;P&gt;Hi did you find any method to pass url as parameter&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 10:07:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Prompt-Credentials/m-p/1501536#M26512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-18T10:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Data Connector Prompt Credentials</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Prompt-Credentials/m-p/1513321#M26579</link>
      <description>&lt;P&gt;You can create an argumented function to get the url as a parameter. Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thisisthefunction = (url as text) =&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&amp;nbsp;&lt;/P&gt;&lt;P&gt;source = Web.Contents(url)&lt;/P&gt;&lt;P&gt;in&amp;nbsp;&lt;/P&gt;&lt;P&gt;source&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 09:56:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Prompt-Credentials/m-p/1513321#M26579</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-24T09:56:43Z</dc:date>
    </item>
  </channel>
</rss>

