<?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 REST API for PBIRS w/customSecuritySample - how to include cookies? in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/REST-API-for-PBIRS-w-customSecuritySample-how-to-include-cookies/m-p/418985#M5689</link>
    <description>&lt;P&gt;Still trying to use the REST API for the on-premise Power BI Report Server with the CustomSecuritySample. I know that I need to supply the authentication cookie that is supplied when I log into the site, but so far, I can't seem to figure out how to specify the cookies properly in the header.&amp;nbsp; I'm using the Swagger library for my REST API calls.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried adding a "Cookie" entry via AddDefaultHeader - the method call doesn't generate an error, but Fidder cannot see any cookies.&amp;nbsp; Is there some other method I should be using to load the cookies with the Swagger objects?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            var server = "myinstance.mysite.com";
            string apiString = string.Format("https://{0}/reportsbi/api/v2.0", server);

            var clientCI = new CatalogItemsApi(apiString);
            clientCI.AddDefaultHeader("Content-Type", "application/json;charset=utf-8");
            clientCI.AddDefaultHeader("Cookie", ".ASPXAUTH=" + cookieValue + ";X-XSRF-NONCE=" + nonce + ";X-XSRF-TOKEN=" + token);

            ODataCatalogItems cItems = clientCI.GetCatalogItems();&lt;/PRE&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;</description>
    <pubDate>Wed, 16 May 2018 19:40:12 GMT</pubDate>
    <dc:creator>teros</dc:creator>
    <dc:date>2018-05-16T19:40:12Z</dc:date>
    <item>
      <title>REST API for PBIRS w/customSecuritySample - how to include cookies?</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/REST-API-for-PBIRS-w-customSecuritySample-how-to-include-cookies/m-p/418985#M5689</link>
      <description>&lt;P&gt;Still trying to use the REST API for the on-premise Power BI Report Server with the CustomSecuritySample. I know that I need to supply the authentication cookie that is supplied when I log into the site, but so far, I can't seem to figure out how to specify the cookies properly in the header.&amp;nbsp; I'm using the Swagger library for my REST API calls.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried adding a "Cookie" entry via AddDefaultHeader - the method call doesn't generate an error, but Fidder cannot see any cookies.&amp;nbsp; Is there some other method I should be using to load the cookies with the Swagger objects?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            var server = "myinstance.mysite.com";
            string apiString = string.Format("https://{0}/reportsbi/api/v2.0", server);

            var clientCI = new CatalogItemsApi(apiString);
            clientCI.AddDefaultHeader("Content-Type", "application/json;charset=utf-8");
            clientCI.AddDefaultHeader("Cookie", ".ASPXAUTH=" + cookieValue + ";X-XSRF-NONCE=" + nonce + ";X-XSRF-TOKEN=" + token);

            ODataCatalogItems cItems = clientCI.GetCatalogItems();&lt;/PRE&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;</description>
      <pubDate>Wed, 16 May 2018 19:40:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/REST-API-for-PBIRS-w-customSecuritySample-how-to-include-cookies/m-p/418985#M5689</guid>
      <dc:creator>teros</dc:creator>
      <dc:date>2018-05-16T19:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: REST API for PBIRS w/customSecuritySample - how to include cookies?</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/REST-API-for-PBIRS-w-customSecuritySample-how-to-include-cookies/m-p/1562325#M17238</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="28267" data-lia-user-login="teros" class="lia-mention lia-mention-user"&gt;teros&lt;/a&gt;&amp;nbsp;Were you able to get through the cookies process?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 09:24:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/REST-API-for-PBIRS-w-customSecuritySample-how-to-include-cookies/m-p/1562325#M17238</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-21T09:24:51Z</dc:date>
    </item>
  </channel>
</rss>

