<?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: Hilti API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3405143#M44162</link>
    <description>&lt;P&gt;At least the Hilti API is definitely a good test case for how universal an ETL tool is.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 18:42:26 GMT</pubDate>
    <dc:creator>Martin_D</dc:creator>
    <dc:date>2023-08-29T18:42:26Z</dc:date>
    <item>
      <title>Hilti API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3401756#M44117</link>
      <description>&lt;P&gt;Dear members&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for help for getting a token for the Hilti-API ON!Track. On the homepage of hilti, there is the specification for postman, but there is no way I'm able to write the M-code properly. Here you can find the specifciation:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://unite.ontrack3.hilti.com/developer/guides/confedit" target="_self" rel="nofollow noopener noreferrer"&gt;https://unite.ontrack3.hilti.com/developer/guides/confedit&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;. I have ClientID, ClientSecret, Username and Password. Can somebody help me?&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;/P&gt;&lt;P&gt;Jimmy&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 07:57:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3401756#M44117</guid>
      <dc:creator>Jimmy801</dc:creator>
      <dc:date>2023-08-28T07:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Hilti API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3405132#M44161</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/160408"&gt;@Jimmy801&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunatelly, Power BI does not support the OAuth Client Credential authentication out of the box.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you only want to get data into Power BI Desktop (not refresh in the service), then this article is a good starting point how to implement this in Power Query, but it might not work with scheduled refresh:&amp;nbsp;&lt;A href="https://pbi-guy.com/2023/03/25/connect-with-power-bi-to-the-power-bi-rest-api-with-a-service-principal/" target="_blank" rel="noopener"&gt;https://pbi-guy.com/2023/03/25/connect-with-power-bi-to-the-power-bi-rest-api-with-a-service-principal/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want a scheduled refresh in the Power BI service, then you can implement a custom connector (might be worth sharing the idea of providing one with Hilti). This might be a good starting point&amp;nbsp;&lt;A href="https://jussiroine.com/2019/02/building-a-custom-connector-for-power-bi-that-supports-oauth2-to-visualize-my-wellness-data/" target="_blank" rel="noopener"&gt;https://jussiroine.com/2019/02/building-a-custom-connector-for-power-bi-that-supports-oauth2-to-visualize-my-wellness-data/&lt;/A&gt;&amp;nbsp;or the &lt;A href="https://learn.microsoft.com/en-us/power-query/handling-authentication" target="_self"&gt;Microsoft documentation&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to use scheduled refresh, I would try copying the required data to a database or datalake using Azure Data Factory and loading it from there into Power BI because Azure Data Factory supports&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/data-factory/connector-rest?tabs=data-factory#use-oauth2-client-credential-authentication" target="_self"&gt;OAuth Client Credential&lt;/A&gt; login out of the box. But it's a bit special that the Hilti API requires you to provide ClientID and ClientSecret and Username and Password in one token request and this is not supported in Azure Data Factory. So either it works with ClientID and ClientSecret only, or you need to implement the custom connector, or any custom script (PowerQuery, Python, C#, ...) that gets your data from the Hilti API to an intermediate storage of your choice (datalake, database, SharePoint, ...).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P class="lia-align-right"&gt;&lt;A title="GitHub" href="https://github.com/MartinBubenheimer" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="github.png" style="width: 34px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/933704i8348AD2A9C7A3ED4/image-dimensions/34x34?v=v2" width="34" height="34" role="button" title="github.png" alt="github.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;A title="linkedin" href="https://www.linkedin.com/in/martin-bubenheimer-9ba99271/" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="linkedin.png" style="width: 36px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/933703i7ADBF83A4A253887/image-dimensions/36x31?v=v2" width="36" height="31" role="button" title="linkedin.png" alt="linkedin.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 18:38:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3405132#M44161</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2023-08-29T18:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hilti API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3405143#M44162</link>
      <description>&lt;P&gt;At least the Hilti API is definitely a good test case for how universal an ETL tool is.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 18:42:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3405143#M44162</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2023-08-29T18:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hilti API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3413181#M44238</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i was now able to make Power Query work to access the Hilti App. I will post the code used here, if somebody has the same problem&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    client_id = "Client_ID",
    client_secret = "Client_Secret",
    token_uri = "https://cloudsso.hilti.com/hc/token", 
    username = "UserName",
    password = "Password",
    scope = "HC.Request.AllScopes",
    requestPayload = [
        username = username,
        password = password,
        grant_type = "password",
        scope = scope
    ],
    requestHeaders = [
        #"Content-Type" = "application/x-www-form-urlencoded",
        #"Authorization" = "Basic " &amp;amp; Binary.ToText(Text.ToBinary(client_id &amp;amp; ":" &amp;amp; client_secret), BinaryEncoding.Base64)
    ],
    tokenResponse = Json.Document(
        Web.Contents(
            token_uri,
            [
                Content = Text.ToBinary(Uri.BuildQueryString(requestPayload)),
                Headers = requestHeaders,
                ManualStatusHandling = {400, 401, 402, 403, 404, 405, 406, 500}
            ]
        )
    )
in
    tokenResponse&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 04 Sep 2023 06:34:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3413181#M44238</guid>
      <dc:creator>Jimmy801</dc:creator>
      <dc:date>2023-09-04T06:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hilti API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3413564#M44244</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/160408"&gt;@Jimmy801&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great solution! Did you try whether it works with scheduled refresh in the service, and did it work there as well? The concern was that your query returns a token, dynamically, i.e. potentially a new one with every refresh, and then the actual data query uses this token, which might be considered an insecure dynamic query by the Power BI service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 09:52:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3413564#M44244</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2023-09-04T09:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hilti API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3414908#M44261</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I just needed it to connect Excel to this API - no scheduled refresh. But as you wrote, it might not be allowed in service. What would be needed to fix that? How is the process to establish a better query?&lt;BR /&gt;BR Jimmy&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 05:33:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3414908#M44261</guid>
      <dc:creator>Jimmy801</dc:creator>
      <dc:date>2023-09-05T05:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Hilti API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3415022#M44265</link>
      <description>&lt;P&gt;For Excel the solution is totally fine. For Power BI scheduled refresh, the next step would either be to implement a custom connector or to put the API access into an external script that puts the data in e.g. a datalake for Power BI to fetch it from there.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 07:00:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Hilti-API/m-p/3415022#M44265</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2023-09-05T07:00:27Z</dc:date>
    </item>
  </channel>
</rss>

