<?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: Missing Authorization in connection string in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Missing-Authorization-in-connection-string/m-p/1505058#M26543</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What type of Auth is it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;How does the Auth need to be provided? In encoded form like this?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;EncodedCredentials = "Basic " &amp;amp; Binary.ToText(Text.ToBinary(ClientID &amp;amp; ":" &amp;amp; Secret), BinaryEncoding.Base64),
    
    Token_Response  = Json.Document(Web.Contents(api_url,
    [ 
      Headers = [#"Content-Type"="application/x-www-form-urlencoded",#"Authorization"=EncodedCredentials],
      Content=Text.ToBinary("grant_type=client_credentials")
    ]
    )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or plain text?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;data= Json.Document(Web.Contents(api_url,
   [ 
     Headers = [#"Authorization"="Bearer "&amp;amp;token,#"Content-Type"="application/json"]
   ]
   )
   )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;If I answered your question please mark my post as the solution.&lt;BR /&gt;If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up. &lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Nov 2020 13:18:03 GMT</pubDate>
    <dc:creator>PhilipTreacy</dc:creator>
    <dc:date>2020-11-19T13:18:03Z</dc:date>
    <item>
      <title>Missing Authorization in connection string</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Missing-Authorization-in-connection-string/m-p/1504524#M26541</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi! I have a report that retrieves data via an API. The code looks like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Source = Json.Document(Web.Contents("https://XXXX/api/external/statistics/v1?from_date=2020-09-01&amp;amp;to_date=2020-10-01&amp;amp;environment=live&amp;amp;language=sv-SE&amp;amp;key=conversation_count", [Headers=[Authorization="XXXXXX"]])),&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works fine, but when I upload the file to the Power BI report server, authorization is not included in the connection string. I get this error message:&amp;nbsp;&lt;SPAN class="ng-scope"&gt;The report server couldn't connect to the data source using the information you entered. Make sure you've entered the connection string and any credentials correctly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="ng-scope"&gt;How should I do so that authorization is included in the connection string? I can not edit it in report server. I need to have autorization as a header, otherwise it wont work.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="ng-scope"&gt;Best regards, Sophia&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 10:25:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Missing-Authorization-in-connection-string/m-p/1504524#M26541</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-19T10:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Authorization in connection string</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Missing-Authorization-in-connection-string/m-p/1505058#M26543</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What type of Auth is it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;How does the Auth need to be provided? In encoded form like this?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;EncodedCredentials = "Basic " &amp;amp; Binary.ToText(Text.ToBinary(ClientID &amp;amp; ":" &amp;amp; Secret), BinaryEncoding.Base64),
    
    Token_Response  = Json.Document(Web.Contents(api_url,
    [ 
      Headers = [#"Content-Type"="application/x-www-form-urlencoded",#"Authorization"=EncodedCredentials],
      Content=Text.ToBinary("grant_type=client_credentials")
    ]
    )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or plain text?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;data= Json.Document(Web.Contents(api_url,
   [ 
     Headers = [#"Authorization"="Bearer "&amp;amp;token,#"Content-Type"="application/json"]
   ]
   )
   )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;If I answered your question please mark my post as the solution.&lt;BR /&gt;If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up. &lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 13:18:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Missing-Authorization-in-connection-string/m-p/1505058#M26543</guid>
      <dc:creator>PhilipTreacy</dc:creator>
      <dc:date>2020-11-19T13:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Authorization in connection string</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Missing-Authorization-in-connection-string/m-p/1505105#M26544</link>
      <description>&lt;P&gt;Hi again, thank you!&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/264323"&gt;@PhilipTreacy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry but I do not know much about APIs, I just followed a guide. I have got one Bearer token.&amp;nbsp;I have entered it like plain text and it works fine until i upload it on Report Server. When Power BI ask me to enter credentials, i choosed &lt;SPAN&gt;anonymous. How can it work locally on my computer but not on report server?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards Sophia&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 15:56:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Missing-Authorization-in-connection-string/m-p/1505105#M26544</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-23T15:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Authorization in connection string</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Missing-Authorization-in-connection-string/m-p/1511539#M26575</link>
      <description>&lt;P&gt;Hi again!&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/264323"&gt;@PhilipTreacy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to create a new report that I retrieve data via the same api, but this time it says that there is no data source in the power bi report server.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Scheduled Data Refresh is not available for reports. The report does not have any external data connections defined or is using an unsupported data source. Learn more&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the report, there are data sources under "Global Permissions" but not "current file".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Sophia &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 15:55:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Missing-Authorization-in-connection-string/m-p/1511539#M26575</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-23T15:55:38Z</dc:date>
    </item>
  </channel>
</rss>

