<?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: Need Cookie in my Rest API Custom data connector - Help please. in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2533932#M36272</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;From what I've understood, Power Query doesn't work with cookies and I stopped chasing it. However, I did hear a couple of them getting through the cookies process using powershell or python inside the power query code. You may want dig more onto this option(currently this is the only option as far as I know).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 May 2022 16:06:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-05-23T16:06:11Z</dc:date>
    <item>
      <title>Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/629205#M18621</link>
      <description>&lt;PRE&gt;// This file contains your Data Connector logic
section SynDNA;

[DataSource.Kind="SynDNA", Publish="SynDNA.Publish"]
shared SynDNA.Feed = Value.ReplaceType(SynDNAImpl, type function (url as Uri.Type) as any);

SynDNAImpl = (url as text) =&amp;gt;

    let
        Credential = Extension.CurrentCredential(),

        CredentialConnectionString = [ UID = Credential[Username], PWD = Credential[Password] ],

       login = Record.ToTable(Json.Document(Web.Contents(url &amp;amp; "/api/login/" &amp;amp; CredentialConnectionString[UID] &amp;amp; "/" &amp;amp; CredentialConnectionString[PWD], [ Headers = DefaultRequestHeaders ]))),
       FilterLogin = Table.SelectRows(login, each _[Name] = "hash" ),
       hash = List.First(Table.Column(FilterLogin, "Value")),
       //source = Web.Contents(url &amp;amp; "/api/report/1/output/Reports/Angus/test_test?auth=" &amp;amp; hash, [ Headers = DefaultRequestHeaders ]),
       source = Web.Contents(url &amp;amp; "/api/reports/search?auth=" &amp;amp; hash &amp;amp; "&amp;amp;keyword=EXCEL", [ Headers = DefaultRequestHeaders ]),
       json = Json.Document(source)
        
        
    in json;



     DefaultRequestHeaders = [
    #"Cookie" = "userkey=1/2321bf021c4a45f23037826cd49fa5d8b619fd6d/8c836beea0263a6f95b59c3e2d6e44ccd741ce50",
    #"Accept" = "application/json;odata.metadata=minimal",  // column name and values only
    #"OData-MaxVersion" = "4.0"                             // we only support v4
];

// Data Source Kind description
SynDNA = [
    Authentication = [
        // Key = [],
         UsernamePassword = []
        // Windows = [],
       // Implicit = [],
       //   Anonymous = []
    ],
    Label = Extension.LoadString("DataSourceLabel")
];&lt;/PRE&gt;&lt;P&gt;I need a way to generate a cookie to pass to my API. In the code above has a key borrowed from making my request in Chrome. This request works in any browser and curl. But in Visual Studio it doesn't add the Cookie as part of a default request header. If I manually add the cookie from a browser request (like I have above the request works) if not I get a 403 error. Help please.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 22:42:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/629205#M18621</guid>
      <dc:creator>sugna66</dc:creator>
      <dc:date>2019-02-21T22:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/771101#M20464</link>
      <description>&lt;P&gt;Same problem with the onpremise Conector via Logic App Custom Connector. Its not possible to pass the cookie Header Paramter to the api.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#NoCookieParameterPassThroughAtCustomConnector&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cookie never arrives at the api...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-08-20_18-50-10.jpg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/186237iC6756C443533C9AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-08-20_18-50-10.jpg" alt="2019-08-20_18-50-10.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 16:54:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/771101#M20464</guid>
      <dc:creator>koeppelsens</dc:creator>
      <dc:date>2019-08-20T16:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/1510685#M26571</link>
      <description>&lt;P&gt;Did any of you get through the cookies process? I'm having a hard time working with cookies in power query. There is no information online about it and no doc that can be referred to, making it even more difficult. I see one more post where it was mentioned that the cookies were not allowed due to security reasons in past:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/How-to-get-set-Cookies-inside-a-visual/m-p/347843" target="_blank"&gt;https://community.powerbi.com/t5/Developer/How-to-get-set-Cookies-inside-a-visual/m-p/347843&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 10:21:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/1510685#M26571</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-23T10:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/1515922#M26597</link>
      <description>&lt;DIV class="lia-quilt-row lia-quilt-row-main"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-main"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Does anyone have any inputs on this. I would appreciate any response.&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Nov 2020 10:11:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/1515922#M26597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T10:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/1562158#M26827</link>
      <description>&lt;P&gt;Its been quite some time and I'm still trying to get information on this. I know we would go out of vacation soon or some would already be on vacation. I would appreciate any inputs before we all head out to our vacation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wishing you all happy holidays.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 08:39:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/1562158#M26827</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-21T08:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/1586055#M27096</link>
      <description>&lt;P&gt;Hello Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm still chasing for the information on cookies. I would appreciate any response.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 09:31:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/1586055#M27096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-07T09:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/1677810#M27962</link>
      <description>&lt;P&gt;You might want to use fiddler to inspect the HTTP requests and from there obtain the correct address where you receive the Cookie value.&lt;/P&gt;&lt;P&gt;In one of my custom connectors, I get my cookie value with the following:&lt;/P&gt;&lt;PRE&gt;let&lt;BR /&gt;    Source = Web.Contents(Uri.Combine(url, "authentication-point/authenticate"), [ Headers = DefaultRequestHeaders ]),&lt;BR /&gt;    Source_Headers = Value.Metadata(Source)[Headers], &lt;BR /&gt;    Auth_Cookie_Header = Source_Headers[#"Set-Cookie"],&lt;/PRE&gt;&lt;P&gt;Web API returns the headers and I retrieve them using Value.Metadata(). The cookie value I need is under the [#"Set-Cookie"].&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 16:31:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/1677810#M27962</guid>
      <dc:creator>rlemmi</dc:creator>
      <dc:date>2021-02-19T16:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2533912#M36270</link>
      <description>&lt;P&gt;how can i solve this? I also find myself in the same situation.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 15:57:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2533912#M36270</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-23T15:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2533932#M36272</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;From what I've understood, Power Query doesn't work with cookies and I stopped chasing it. However, I did hear a couple of them getting through the cookies process using powershell or python inside the power query code. You may want dig more onto this option(currently this is the only option as far as I know).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 16:06:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2533932#M36272</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-23T16:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2533946#M36274</link>
      <description>&lt;P&gt;PQ does work with cookies. All you have to do is create a custom connector with VS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check this article from microsoft and follow their TripPin walkthrough.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-query/samples/trippin/readme" target="_blank"&gt;TripPin tutorial sequence - Power Query | Microsoft Docs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 16:11:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2533946#M36274</guid>
      <dc:creator>rlemmi</dc:creator>
      <dc:date>2022-05-23T16:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2533964#M36275</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/286436"&gt;@rlemmi&lt;/a&gt;&amp;nbsp;This is a good news. Its been a long time since I spent time building an OAuth connector and cookies didn't work back then. Maybe I'll go through that link some time. Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 16:21:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2533964#M36275</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-23T16:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2534095#M36278</link>
      <description>&lt;P&gt;&lt;FONT&gt;Thank you for responding, I was reviewing the ability to do it with python, however this script would have to run in 'Power Query Web' because that is where I am creating the 'dataset', however I could not does not exist in the data source options.&lt;BR /&gt;. That is why I am trying to solve it only with M Language.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jgarcia_new_0-1653326967748.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/720136i0A3945B4B87B256F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jgarcia_new_0-1653326967748.png" alt="jgarcia_new_0-1653326967748.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I really don't know what else to do to get the data from that API safely.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 17:46:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/2534095#M36278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-23T17:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need Cookie in my Rest API Custom data connector - Help please.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/3218064#M42508</link>
      <description>&lt;P&gt;Can you explain this a little more? I'm struggling with this and I don't know if I need to build a custom connector (which I have no clue how to do). I have a login api that is using username and password as post method. Then I am to use the sessionid (#"Set-Cookie) created from that login api and pass that through the data api.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 14:23:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Need-Cookie-in-my-Rest-API-Custom-data-connector-Help-please/m-p/3218064#M42508</guid>
      <dc:creator>Neiners</dc:creator>
      <dc:date>2023-05-03T14:23:56Z</dc:date>
    </item>
  </channel>
</rss>

