<?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: Connecting to API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2378641#M34803</link>
    <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;I had encountered some other issue. So i created it as a function and called the function.&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="lojithlk_0-1646656748056.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/680216i2489DD1924E164DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lojithlk_0-1646656748056.png" alt="lojithlk_0-1646656748056.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Mar 2022 12:40:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-03-07T12:40:19Z</dc:date>
    <item>
      <title>Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2360842#M34630</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to connect PowerBI to API. I a doing this for the first time, so not sure how to proceed. Looking for your guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the URL I am trying to connect.&lt;/P&gt;&lt;P&gt;&lt;A href="https://login.microsoftonline.com/ea80952e-a476-42d4-aaf4-5457852b0f7e/oauth2/token" target="_blank" rel="noopener"&gt;https://login.microsoftonline.com/ea80952e-a476-42d4-aaf4-5457852b0f7e/oauth2/token&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following details:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;client_id = 'c*****a'&lt;BR /&gt;2. client_secret = 'r********e'&lt;BR /&gt;3. &lt;SPAN&gt;resource&lt;/SPAN&gt;= 'f********9'&lt;/P&gt;&lt;P&gt;4. grant_type=&lt;SPAN&gt;client_credentials&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to provide the details as&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lojithlk_0-1645782352159.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/675667i5DEF420D1A0AF531/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lojithlk_0-1645782352159.png" alt="lojithlk_0-1645782352159.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Getting the below error.&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="lojithlk_1-1645782428242.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/675670iE3C02C6FD83C441E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lojithlk_1-1645782428242.png" alt="lojithlk_1-1645782428242.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting the response from Postman.&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 09:50:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2360842#M34630</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-25T09:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2360871#M34633</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;You will require authentication key for that API to use header. If you have details you can enter and issue will get resolved.&lt;BR /&gt;For refrence you can check below link,&lt;BR /&gt;&lt;A href="https://www.google.com/search?q=connect+api+with+power+bi&amp;amp;rlz=1C1YQLS_enIN975IN975&amp;amp;oq=connect+api+with+power+bi&amp;amp;aqs=chrome.0.0i512j0i22i30l3.4737j0j4&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8#kpvalbx=_86cYYpb_GIq75OUP8-ahiA819" target="_blank"&gt;https://www.google.com/search?q=connect+api+with+power+bi&amp;amp;rlz=1C1YQLS_enIN975IN975&amp;amp;oq=connect+api+with+power+bi&amp;amp;aqs=chrome.0.0i512j0i22i30l3.4737j0j4&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8#kpvalbx=_86cYYpb_GIq75OUP8-ahiA819&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Prateek G&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 10:00:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2360871#M34633</guid>
      <dc:creator>ghumarepratik21</dc:creator>
      <dc:date>2022-02-25T10:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2360992#M34635</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/308523"&gt;@ghumarepratik21&lt;/a&gt;. for the response. I have the client_secret which should be the API key, i believe. Anyways, I will check on this line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 11:12:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2360992#M34635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-25T11:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2368816#M34717</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;AFAIK, these types of parameters(e.g. client id, secret) will be transformed into a binary string and attached to the httprequest 'content' part instead of directly sending the original string from the httprequest header.&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    url = "https://login.microsoftonline.com/xxxxxxx/oauth2/token",
    GetJson =
        Web.Contents(
            url,
            [
                Headers = [
                    Accept = "application/json",
                    ContentType = "application/x-www-form-urlencoded"
                ],
                Content =
                    Text.ToBinary(
                        "grant_type=client_credentials&amp;amp;
                        client_id=xxxxxxx&amp;amp;
                        client_secret=xxxxxxx&amp;amp;
                        scope=xxxxxx"
                    )
            ]
        ),
    token = Json.Document(GetJson)[access_token],
    Result =
        Web.Contents(
            "https://xxxxx.xxx.com",
            [
                Headers = [
                    #"Content-Type" = "application/json",
                    Authorization = "Bearer " + token,
                    RelativePath = "/xxxxx/xxxxx"
                ]
            ]
        )
in
    Result&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 02:31:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2368816#M34717</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-02T02:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2369847#M34725</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;for your inputs. Will explore on this.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 11:18:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2369847#M34725</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-02T11:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2370216#M34730</link>
      <description>&lt;P&gt;Go to Data source settings, Select the connection from the list to which you are connecting. Click on edit permissions and check it's set to anonymous, if not then set it to anonymous.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 13:57:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2370216#M34730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-02T13:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2370379#M34733</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;that is a great suggestion, I was able to move to the next stage, but encountering a different issue. Is this something to do with the parameters I am passing? Any suggestion on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the screenshot of parameters I'm passing.&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="lojithlk_0-1646232956372.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/678131iC5369F2320443193/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lojithlk_0-1646232956372.png" alt="lojithlk_0-1646232956372.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lojithlk_1-1646233016971.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/678132i2AE7FF5F731C26B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lojithlk_1-1646233016971.png" alt="lojithlk_1-1646233016971.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the error I am getting&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="lojithlk_2-1646233053359.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/678133iE54D93BF0057F296/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lojithlk_2-1646233053359.png" alt="lojithlk_2-1646233053359.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 14:57:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2370379#M34733</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-02T14:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2371889#M34741</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;Try to do it from advance editor query and Put the code as below. Power BI is taking your request as a GET request instead of POST request so you need to create it as a post request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are passing these values in Headers but these should be passed in the body part.&amp;nbsp;&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="shashinonu_0-1646289963516.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/678495i617A5FF2A2DBB17A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shashinonu_0-1646289963516.png" alt="shashinonu_0-1646289963516.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 06:49:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2371889#M34741</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-03T06:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2372691#M34747</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;@Anonymous&lt;/a&gt;,&amp;nbsp;I will check this and get back.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 13:15:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2372691#M34747</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-03T13:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2378610#M34802</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;did it work for you?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 12:30:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2378610#M34802</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-07T12:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2378641#M34803</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;I had encountered some other issue. So i created it as a function and called the function.&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="lojithlk_0-1646656748056.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/680216i2489DD1924E164DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lojithlk_0-1646656748056.png" alt="lojithlk_0-1646656748056.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 12:40:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2378641#M34803</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-07T12:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2378789#M34806</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;Great, the idea was only to pass the credential in the body and not in header as you were doing earlier.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 13:46:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2378789#M34806</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-07T13:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2378808#M34808</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;totally agree, that was a wonderful pointer.. accepting this as a solution. One should not pass credential in the header but should be passed along in the body.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 13:50:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2378808#M34808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-07T13:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2576509#M36681</link>
      <description>&lt;P&gt;Hello&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Does it work for you now?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 02:49:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connecting-to-API/m-p/2576509#M36681</guid>
      <dc:creator>vannda21</dc:creator>
      <dc:date>2022-06-14T02:49:14Z</dc:date>
    </item>
  </channel>
</rss>

