<?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: Client Credentials Grant Type Issue with Power BI API, Password Grant Successful in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Client-Credentials-Grant-Type-Issue-with-Power-BI-API-Password/m-p/3864920#M51962</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;Thanks for your quick response. Do you have any documented evidance on Q1 that is on&amp;nbsp;&lt;SPAN&gt;known issue in authentication mechanisms.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2024 09:30:37 GMT</pubDate>
    <dc:creator>Lingaraj-Mishra</dc:creator>
    <dc:date>2024-04-24T09:30:37Z</dc:date>
    <item>
      <title>Client Credentials Grant Type Issue with Power BI API, Password Grant Successful</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Client-Credentials-Grant-Type-Issue-with-Power-BI-API-Password/m-p/3860038#M51917</link>
      <description>&lt;P&gt;Hello Power BI Community,&lt;/P&gt;&lt;P&gt;I am experiencing difficulty with authenticating API requests using the OAuth 2.0 client credentials grant type for the Power BI REST API, although the password grant type works without issue. I am trying to access &lt;A href="https://api.powerbi.com/v1.0/myorg/datasets" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/datasets&lt;/A&gt; which requires authentication tokens that I am attempting to retrieve via Azure Active Directory (Azure AD).&lt;/P&gt;&lt;P&gt;Here is a breakdown of the steps I've followed:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Application Registration&lt;/STRONG&gt;: I registered my application in Azure AD, ensuring it has the necessary API permissions for Power BI&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Token Request with Client Credentials&lt;/STRONG&gt;:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I am using the endpoint &lt;A href="https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token" target="_blank" rel="noopener"&gt;https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token&lt;/A&gt; for token generation. Here’s the curl command I use (with sensitive data omitted):&lt;/LI&gt;&lt;LI&gt;curl -X POST &lt;A href="https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token" target="_blank" rel="noopener"&gt;https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token&lt;/A&gt; \&lt;BR /&gt;-H "Content-Type: application/x-www-form-urlencoded" \&lt;BR /&gt;-d "client_id={client_id}" \&lt;BR /&gt;-d "client_secret={client_secret}" \&lt;BR /&gt;-d "grant_type=client_credentials" \&lt;BR /&gt;-d "scope=&lt;A href="https://analysis.windows.net/powerbi/api/.default" target="_blank" rel="noopener"&gt;https://analysis.windows.net/powerbi/api/.default&lt;/A&gt;"&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;401 Unauthorized Error&lt;/STRONG&gt;: Despite following all documented steps and verifying that the client ID, secret, and tenant ID are correct, I receive a 401 Unauthorized error when I attempt to use the generated token to make API requests. Interestingly, if I switch to using the OAuth 2.0 password grant type to generate a token, everything works as expected.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P class="lia-align-left"&gt;Here are some additional details:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The application permissions in Azure AD include all necessary Power BI related permissions and have been granted admin consent.&lt;/LI&gt;&lt;LI&gt;There are no alerts or incidents reported on the Azure status page that indicate an ongoing issue with Azure AD or Power BI services.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is there a known issue in authentication mechanisms for Power BI that might affect the client credentials flow?&lt;/LI&gt;&lt;LI&gt;Are there known issues or maintenance activities affecting the OAuth 2.0 client credentials grant type for Power BI APIs?&lt;/LI&gt;&lt;LI&gt;Could there be specific tenant configurations in Azure AD that might restrict or alter the expected behavior of the client credentials grant?&lt;/LI&gt;&lt;LI&gt;Any suggestions on troubleshooting steps or alternative configurations that could resolve or work around this issue?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I appreciate any insights or suggestions you might have. Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 17:10:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Client-Credentials-Grant-Type-Issue-with-Power-BI-API-Password/m-p/3860038#M51917</guid>
      <dc:creator>Lingaraj-Mishra</dc:creator>
      <dc:date>2024-04-22T17:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Client Credentials Grant Type Issue with Power BI API, Password Grant Successful</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Client-Credentials-Grant-Type-Issue-with-Power-BI-API-Password/m-p/3860571#M51921</link>
      <description>&lt;P&gt;1. yes&lt;/P&gt;
&lt;P&gt;2. yes&lt;/P&gt;
&lt;P&gt;3. no&lt;/P&gt;
&lt;P&gt;4. Use a custom connector with AAD, for example&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/migueesc123/PowerBIRESTAPI" target="_blank"&gt;GitHub - migueesc123/PowerBIRESTAPI: A Microsoft Power BI Data Connector or Power Query Connector for the Power BI REST API&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 00:04:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Client-Credentials-Grant-Type-Issue-with-Power-BI-API-Password/m-p/3860571#M51921</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-23T00:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Client Credentials Grant Type Issue with Power BI API, Password Grant Successful</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Client-Credentials-Grant-Type-Issue-with-Power-BI-API-Password/m-p/3864920#M51962</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;Thanks for your quick response. Do you have any documented evidance on Q1 that is on&amp;nbsp;&lt;SPAN&gt;known issue in authentication mechanisms.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 09:30:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Client-Credentials-Grant-Type-Issue-with-Power-BI-API-Password/m-p/3864920#M51962</guid>
      <dc:creator>Lingaraj-Mishra</dc:creator>
      <dc:date>2024-04-24T09:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Client Credentials Grant Type Issue with Power BI API, Password Grant Successful</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Client-Credentials-Grant-Type-Issue-with-Power-BI-API-Password/m-p/3865324#M51967</link>
      <description>&lt;P&gt;For Q1 read through Chris Webb's blog.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 11:54:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Client-Credentials-Grant-Type-Issue-with-Power-BI-API-Password/m-p/3865324#M51967</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-24T11:54:22Z</dc:date>
    </item>
  </channel>
</rss>

