<?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: Workload Development Toolkit CRUD APIs in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4373085#M6295</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Hope your doing well.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, we wanted to kindly follow up to check if the solution we have provided for your issue worked? or let us know if you need any further assistance here?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Your feedback is important to us,&amp;nbsp;Looking forward to your response.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prashanth Are&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;MS Fabric community support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jan 2025 07:10:43 GMT</pubDate>
    <dc:creator>v-prasare</dc:creator>
    <dc:date>2025-01-21T07:10:43Z</dc:date>
    <item>
      <title>Workload Development Toolkit CRUD APIs</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4363281#M6083</link>
      <description>&lt;P&gt;Hi there,&lt;BR /&gt;&lt;BR /&gt;I am trying to generate Authentication bearer token on the fly, to create Datawarehouse via sample workload using the POST APIs available for it.&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-warehouse/collation" target="_blank" rel="noopener"&gt;How to: Create warehouses with case-insensitive (CI) collation - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Just FYI: I was able to do so&amp;nbsp; by hard coding my bearer token.&lt;BR /&gt;&lt;BR /&gt;Workload doc for the CRUD APIs auth setup is&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/fabric/workload-development-kit/authentication-tutorial#add-a-scope-for-crud-apis-and-jobs" target="_blank" rel="noopener"&gt;Authentication setup - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please help me with some alternative.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { PublicClientApplication, AuthenticationResult } from "@azure/msal-browser";

/// MSAL configuration
const msalConfig = {
auth: {
clientId: "************************", // Replace with your client ID
authority: "https://login.microsoftonline.com/***************", // Replace with your tenant ID
redirectUri: "http://localhost:60006/close", // Replace with your redirect URI
},
};

const msalInstance = new PublicClientApplication(msalConfig);

async function initializeMsal() {
await msalInstance.initialize();
}

async function acquireToken(): Promise&amp;lt;string&amp;gt; {
const request = {
scopes: ["https:api://localdevinstance/******************************/Org.WorkloadSample/FabricWorkloadControl"], // Replace with your API scopes
};

try {
const response: AuthenticationResult = await msalInstance.acquireTokenSilent(request);
return response.accessToken;
} catch (error) {
const response: AuthenticationResult = await msalInstance.acquireTokenPopup(request);
return response.accessToken;
}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 12:52:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4363281#M6083</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-14T12:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Workload Development Toolkit CRUD APIs</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4363717#M6092</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could try python in Fabric notebook. This way you don't have to worry about setting up access token retrieval since you can directly get it from Fabric. The following code will allow you to call any REST API in Fabric.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#Helper function to call Fabric REST API

from notebookutils import mssparkutils as msu
import requests
import time

def call_fabric_api(method, uri, payload=None):
    endpoint = "https://api.fabric.microsoft.com/v1"

    # Get PBI Access token and have it in the header for Authorization
    headers = {
        "Authorization": "Bearer " + msu.credentials.getToken("pbi"),
        "Content-Type": "application/json"
    }

    #Create new session and try sending a request to the Fabric REST API
    session = requests.Session()
    try:
        url = f"{endpoint}/{uri}"
            
        response = session.request(method, url, headers=headers, json=payload, timeout=120)
        print(response.json())
        return response.json()

    except requests.RequestException as ex:
        print(ex)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if you are looking for access token specifically, the following is the CURL format that I normally use with Postman&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --location 'https://login.microsoftonline.com/&amp;lt;Tenant ID&amp;gt;/oauth2/token?Content-Type=application%2Fx-www-form-urlencoded' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=&amp;lt;Service Principal ID or Username&amp;gt;' \
--data-urlencode 'client_secret=&amp;lt;Secret or Password&amp;gt;' \
--data-urlencode 'resource=https://management.azure.com/'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 17:22:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4363717#M6092</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2025-01-14T17:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Workload Development Toolkit CRUD APIs</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4373085#M6295</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Hope your doing well.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, we wanted to kindly follow up to check if the solution we have provided for your issue worked? or let us know if you need any further assistance here?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Your feedback is important to us,&amp;nbsp;Looking forward to your response.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prashanth Are&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;MS Fabric community support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 07:10:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4373085#M6295</guid>
      <dc:creator>v-prasare</dc:creator>
      <dc:date>2025-01-21T07:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Workload Development Toolkit CRUD APIs</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4384097#M6597</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/912446" target="_blank"&gt;@Sanket9831&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Hope your doing well.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, we wanted to kindly follow up to check if the solution we have provided for your issue worked? or let us know if you need any further assistance here?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Your feedback is important to us,&amp;nbsp;Looking forward to your response.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prashanth Are&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;MS Fabric community support.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 10:52:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4384097#M6597</guid>
      <dc:creator>v-prasare</dc:creator>
      <dc:date>2025-01-28T10:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Workload Development Toolkit CRUD APIs</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4389420#M6741</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;, Hope your doing well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, we wanted to kindly follow up to check if the solution we have provided for your issue worked? or let us know if you need any further assistance here?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Your feedback is important to us,&amp;nbsp;Looking forward to your response.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prashanth Are&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;MS Fabric community support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did we answer your question?&amp;nbsp;&lt;STRONG&gt;Mark post as a solution,&amp;nbsp;&lt;/STRONG&gt;this will help others!&lt;/P&gt;
&lt;P&gt;If our response(s) assisted you in any way, don't forget to drop me a "&lt;STRONG&gt;Kudos&lt;/STRONG&gt;"&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 07:26:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Workload-Development-Toolkit-CRUD-APIs/m-p/4389420#M6741</guid>
      <dc:creator>v-prasare</dc:creator>
      <dc:date>2025-01-31T07:26:38Z</dc:date>
    </item>
  </channel>
</rss>

