<?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 PowerShell Unable to connect with app registration in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerShell-Unable-to-connect-with-app-registration/m-p/2178090#M32797</link>
    <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get a report about usage of PowerBI in my tenant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I installed PowerBi module, but when I try to connect with App Registration, I get nothing but errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My app has following permissions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried 2 methodes to connect:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint xxxxxx -ApplicationId yyyyyyyy&lt;/P&gt;&lt;P&gt;Error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Solution found here: &lt;A href="https://github.com/microsoft/powerbi-powershell/issues/215" target="_blank" rel="noopener"&gt;https://github.com/microsoft/powerbi-powershell/issues/215&lt;/A&gt;&lt;/P&gt;&lt;P&gt;$secureServicePrincipalPassword= ConvertTo-SecureString $ServicePrincipalSecret -AsPlainText -Force&lt;BR /&gt;&amp;nbsp;$servicePrincipal = New-Object -TypeName PSCredential -ArgumentList $ServicePrincipalId, $secureServicePrincipalPassword&lt;BR /&gt;&amp;nbsp;Connect-PowerBIServiceAccount -ServicePrincipal -Credential $servicePrincipal -Environment Public -Tenant xxxxxxxx&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I am quite sure, that I can coppy the ID rom AAD.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have an idea, what is wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Nov 2021 13:00:18 GMT</pubDate>
    <dc:creator>JoanLel</dc:creator>
    <dc:date>2021-11-08T13:00:18Z</dc:date>
    <item>
      <title>PowerShell Unable to connect with app registration</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerShell-Unable-to-connect-with-app-registration/m-p/2178090#M32797</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get a report about usage of PowerBI in my tenant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I installed PowerBi module, but when I try to connect with App Registration, I get nothing but errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My app has following permissions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried 2 methodes to connect:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint xxxxxx -ApplicationId yyyyyyyy&lt;/P&gt;&lt;P&gt;Error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Solution found here: &lt;A href="https://github.com/microsoft/powerbi-powershell/issues/215" target="_blank" rel="noopener"&gt;https://github.com/microsoft/powerbi-powershell/issues/215&lt;/A&gt;&lt;/P&gt;&lt;P&gt;$secureServicePrincipalPassword= ConvertTo-SecureString $ServicePrincipalSecret -AsPlainText -Force&lt;BR /&gt;&amp;nbsp;$servicePrincipal = New-Object -TypeName PSCredential -ArgumentList $ServicePrincipalId, $secureServicePrincipalPassword&lt;BR /&gt;&amp;nbsp;Connect-PowerBIServiceAccount -ServicePrincipal -Credential $servicePrincipal -Environment Public -Tenant xxxxxxxx&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I am quite sure, that I can coppy the ID rom AAD.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have an idea, what is wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 13:00:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerShell-Unable-to-connect-with-app-registration/m-p/2178090#M32797</guid>
      <dc:creator>JoanLel</dc:creator>
      <dc:date>2021-11-08T13:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell Unable to connect with app registration</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerShell-Unable-to-connect-with-app-registration/m-p/2185014#M32865</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="337464" data-lia-user-login="JoanLel" class="lia-mention lia-mention-user"&gt;JoanLel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on your error message, it seems to be a problem with permissions and account authentication. Are you trying to use Powershell to call some API or implement some other functionality? Could you provide more detailed information please? Before using Powershell, please check the prerequisite information below to make sure you have the proper permissions.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/powershell/power-bi/overview?view=powerbi-ps#usage" target="_self"&gt;&lt;STRONG&gt;Microsoft Power BI Cmdlets for Windows PowerShell and PowerShell Core&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;H2 id="usage" class="heading-anchor"&gt;Usage&lt;/H2&gt;
&lt;P&gt;Two scopes are supported by cmdlets that interact with Power BI entities:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Individual is used to access entities that belong to the current user.&lt;/LI&gt;
&lt;LI&gt;Organization is used to access entities across the entire company. Only Power BI tenant admins are allowed to use.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If the -Scope parameter doesn't exist on the cmdlet, the entity doesn't support an Administrative API.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In addition, here are some links that describe using Powershell to get Power BI information. Please check them out and I hope they will help you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.proserveit.com/blog/power-bi-usage-metrics-across-all-workspaces" target="_self"&gt;&lt;STRONG&gt;Power BI Usage Metrics Across All Workspaces: Step by Step&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=SQ7ufcRayYY" target="_self"&gt;&lt;STRONG&gt;Power BI PowerShell and the Admin API&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 10:16:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerShell-Unable-to-connect-with-app-registration/m-p/2185014#M32865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-11T10:16:17Z</dc:date>
    </item>
  </channel>
</rss>

