<?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: accessToken error issue while calling API through REST connector in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4025965#M4403</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="746503" data-lia-user-login="AmanShaikh" class="lia-mention lia-mention-user"&gt;AmanShaikh&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;It looks like you are experiencing issues with the accessToken parameter not being passed correctly when calling the REST API through the REST connector in the fabric using service principal authentication, the accessToken on the screenshot is currently null.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the first thing you can do is to generate it using a tool like Postman or programmatically in code, you can try the following Postman code for generating the token.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;POST https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
client_id={your-client-id}
client_secret={your-client-secret}
scope=https://api.fabric.microsoft.com/.default
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Once you have the access token, you need to include it in the headers of your REST API request. Typically, this is done by adding an Authorization header with the value Bearer {accessToken}.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also you need to make sure that&amp;nbsp;the service principal has the necessary permissions to access the Fabric APIs. This includes adding the service principal to the Fabric workspaces with at least a Contributor role.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2024 02:16:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-07-05T02:16:56Z</dc:date>
    <item>
      <title>accessToken error issue while calling API through REST connector</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4024166#M4387</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am facing issue while calling REST API through REST connector in Fabric using Service Principal Authentication. Where to pass this accessToken ?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 05:28:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4024166#M4387</guid>
      <dc:creator>AmanShaikh</dc:creator>
      <dc:date>2024-07-04T05:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: accessToken error issue while calling API through REST connector</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4025965#M4403</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="746503" data-lia-user-login="AmanShaikh" class="lia-mention lia-mention-user"&gt;AmanShaikh&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;It looks like you are experiencing issues with the accessToken parameter not being passed correctly when calling the REST API through the REST connector in the fabric using service principal authentication, the accessToken on the screenshot is currently null.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the first thing you can do is to generate it using a tool like Postman or programmatically in code, you can try the following Postman code for generating the token.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;POST https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
client_id={your-client-id}
client_secret={your-client-secret}
scope=https://api.fabric.microsoft.com/.default
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Once you have the access token, you need to include it in the headers of your REST API request. Typically, this is done by adding an Authorization header with the value Bearer {accessToken}.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also you need to make sure that&amp;nbsp;the service principal has the necessary permissions to access the Fabric APIs. This includes adding the service principal to the Fabric workspaces with at least a Contributor role.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 02:16:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4025965#M4403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-05T02:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: accessToken error issue while calling API through REST connector</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4049894#M4634</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="746503" data-lia-user-login="AmanShaikh" class="lia-mention lia-mention-user"&gt;AmanShaikh&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!&lt;/SPAN&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;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 06:12:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4049894#M4634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-19T06:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: accessToken error issue while calling API through REST connector</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4052944#M4650</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&lt;BR /&gt;I was trying to get data from API, but now I am using other solution to get data from the source. So I didn't try this.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 03:56:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4052944#M4650</guid>
      <dc:creator>AmanShaikh</dc:creator>
      <dc:date>2024-07-22T03:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: accessToken error issue while calling API through REST connector</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4062910#M4726</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="746503" data-lia-user-login="AmanShaikh" class="lia-mention lia-mention-user"&gt;AmanShaikh&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'm glad you found another way to solve your problem, could you please share your method?&lt;/P&gt;
&lt;P&gt;If you can, I'm sure it can help other users on the forum!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 06:17:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/accessToken-error-issue-while-calling-API-through-REST-connector/m-p/4062910#M4726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-26T06:17:17Z</dc:date>
    </item>
  </channel>
</rss>

