<?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 Call Fabric data pipelines using notebooks via API's in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Call-Fabric-data-pipelines-using-notebooks-via-API-s/m-p/4600351#M7771</link>
    <description>&lt;P&gt;Hi Community!&lt;BR /&gt;Greetings!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently working on an interesting solution for which I need to call pipelines via Rest API, i see there are already many questions posted on this on community regarding the topic. However, none of them talks about the steps or way to generate access token.&amp;nbsp;I would like to know how to generate access token using Azure AD as service principle authentication is not supported for this API call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/core/job-scheduler/run-on-demand-item-job" target="_self"&gt;https://learn.microsoft.com/en-us/rest/api/fabric/core/job-scheduler/run-on-demand-item-job&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I request your assistance here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 07 Mar 2025 11:54:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-03-07T11:54:29Z</dc:date>
    <item>
      <title>Call Fabric data pipelines using notebooks via API's</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Call-Fabric-data-pipelines-using-notebooks-via-API-s/m-p/4600351#M7771</link>
      <description>&lt;P&gt;Hi Community!&lt;BR /&gt;Greetings!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently working on an interesting solution for which I need to call pipelines via Rest API, i see there are already many questions posted on this on community regarding the topic. However, none of them talks about the steps or way to generate access token.&amp;nbsp;I would like to know how to generate access token using Azure AD as service principle authentication is not supported for this API call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/core/job-scheduler/run-on-demand-item-job" target="_self"&gt;https://learn.microsoft.com/en-us/rest/api/fabric/core/job-scheduler/run-on-demand-item-job&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I request your assistance here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 11:54:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Call-Fabric-data-pipelines-using-notebooks-via-API-s/m-p/4600351#M7771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-03-07T11:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Call Fabric data pipelines using notebooks via API's</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Call-Fabric-data-pipelines-using-notebooks-via-API-s/m-p/4601356#M7779</link>
      <description>&lt;P&gt;1) Easiest way of calling the Fabric APIs from within a Fabric notebook is to use semantic-link-labs (aka sempy) and create an instance of FabricRESTClient, which uses the credentials of the logged in user to run the API&lt;BR /&gt;&lt;A href="https://fabric.guru/using-fabricrestclient-to-make-fabric-rest-api-calls" target="_blank"&gt;https://fabric.guru/using-fabricrestclient-to-make-fabric-rest-api-calls&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) If you really want to generate an access token yourself there are 2-3 ways.&amp;nbsp; Firstly you can&amp;nbsp; use the &lt;EM&gt;msal&lt;/EM&gt; python library&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/entra/msal/python/" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/entra/msal/python/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;3) Secondly you can craft your token request using the azure identities libraries&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/identity/access-tokens?tabs=windows&amp;amp;pivots=programming-language-python" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/identity/access-tokens?tabs=windows&amp;amp;pivots=programming-language-python&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4) Lastly you can try to use the requests library (although tbh I've only ever got these working with service principals, which as you note won't kick a pipeline off.&lt;BR /&gt;&lt;BR /&gt;If this helps, please &lt;EM&gt;Accept as a Solution&lt;/EM&gt; to help others find it more easily.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Mar 2025 14:40:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Call-Fabric-data-pipelines-using-notebooks-via-API-s/m-p/4601356#M7779</guid>
      <dc:creator>spencer_sa</dc:creator>
      <dc:date>2025-03-08T14:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Call Fabric data pipelines using notebooks via API's</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Call-Fabric-data-pipelines-using-notebooks-via-API-s/m-p/4601473#M7780</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/679603"&gt;@spencer_sa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated, since I had to automate this process with scheduling notebook. &lt;STRONG&gt;Fabric Rest Client&lt;/STRONG&gt; worked for me. (Apparently idk if it uses the users stored credential as for testing I closed my Fabric window and it still worked.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other options however cannot be automated as there will either be a login page(like msal) and import requests definitely didn't work as it is specific to service principals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps for anyone else looking!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Mar 2025 06:45:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Call-Fabric-data-pipelines-using-notebooks-via-API-s/m-p/4601473#M7780</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-03-08T06:45:57Z</dc:date>
    </item>
  </channel>
</rss>

