<?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: How to disable multi factor authentication to use POwer BI REST API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1091463#M23696</link>
    <description>&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;Yes, I had tried out service principal way earlier, when didn't have powerbi pro account. And, it hadn't work earlier.&lt;/P&gt;&lt;P&gt;Which is why, I had purchase powerBI pro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't recall the actual error now, but somewhere it was related to not able to generate access token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now, I got unblocked by disabling multi factor authentication using following:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Service/Disabling-multi-factor-authentication-for-power-bi/m-p/1087144/highlight/true#M95752" target="_blank"&gt;https://community.powerbi.com/t5/Service/Disabling-multi-factor-authentication-for-power-bi/m-p/1087144/highlight/true#M95752&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2020 11:20:55 GMT</pubDate>
    <dc:creator>piper</dc:creator>
    <dc:date>2020-05-15T11:20:55Z</dc:date>
    <item>
      <title>How to disable multi factor authentication to use POwer BI REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/535382#M16498</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running a powershell script to get the refresh history of all pbi reports of respective workspaces.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt;: I need to run the script manually, I mention here manually because whenever I run the script it ask me to validate my Microsoft account by entering the pin code (multi-factor authentication). Due to this I am not able to automate the script. I don’t know if it is possible to get authentication token without validating the account or to disable multi-factor authentication. Any suggestion would be really helpful.&lt;/P&gt;&lt;P&gt;Below is the code to Get authentication token:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$clientId = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"&lt;/P&gt;&lt;P&gt;# Calls the Active Directory Authentication Library (ADAL) to authenticate against AAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;function GetAuthToken&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $adal = "${env:ProgramFiles}\WindowsPowerShell\Modules\AzureRM.profile\5.3.2\Microsoft.IdentityModel.Clients.ActiveDirectory.dll"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $adalforms = "${env:ProgramFiles}\WindowsPowerShell\Modules\AzureRM.profile\5.3.2\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [System.Reflection.Assembly]::LoadFrom($adal) | Out-Null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [System.Reflection.Assembly]::LoadFrom($adalforms) | Out-Null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $redirectUri = "&lt;A href="https://oauth.powerbi.com/PBIAPIExplorer" target="_blank"&gt;https://oauth.powerbi.com/PBIAPIExplorer&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $resourceAppIdURI = "&lt;A href="https://analysis.windows.net/powerbi/api" target="_blank"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $authority = "&lt;A href="https://login.microsoftonline.com/common/oauth2/authorize" target="_blank"&gt;https://login.microsoftonline.com/common/oauth2/authorize&lt;/A&gt;";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $authContext = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext" -ArgumentList $authority&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $authResult = $authContext.AcquireToken($resourceAppIdURI, $clientId, $redirectUri, "Auto")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $authResult&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Get the auth token from AAD&lt;/P&gt;&lt;P&gt;$token = GetAuthToken&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advanced&lt;/P&gt;</description>
      <pubDate>Sat, 06 Oct 2018 15:24:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/535382#M16498</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-06T15:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable multi factor authentication to use POwer BI REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1086392#M23626</link>
      <description>&lt;P&gt;Had you succeeded in disabling multi factor authentication for power bi rest api?&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 16:34:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1086392#M23626</guid>
      <dc:creator>piper</dc:creator>
      <dc:date>2020-05-12T16:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable multi factor authentication to use POwer BI REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1086514#M23631</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/227432"&gt;@piper&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for reply, unfortunately no.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 17:46:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1086514#M23631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-12T17:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable multi factor authentication to use POwer BI REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1086542#M23632</link>
      <description>&lt;P&gt;I am also stucked with same issue since couple of days.&lt;/P&gt;&lt;P&gt;Can you share what work around you had used to get things working?&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 18:02:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1086542#M23632</guid>
      <dc:creator>piper</dc:creator>
      <dc:date>2020-05-12T18:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable multi factor authentication to use POwer BI REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1087908#M23652</link>
      <description>&lt;P&gt;Have you tried using Service Principal/App Registration via AAD? Make sure you assign PowerBI API Permissions for the registration and then you can get an access token for the registration&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 13:07:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1087908#M23652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-13T13:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable multi factor authentication to use POwer BI REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1091463#M23696</link>
      <description>&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;Yes, I had tried out service principal way earlier, when didn't have powerbi pro account. And, it hadn't work earlier.&lt;/P&gt;&lt;P&gt;Which is why, I had purchase powerBI pro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't recall the actual error now, but somewhere it was related to not able to generate access token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now, I got unblocked by disabling multi factor authentication using following:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Service/Disabling-multi-factor-authentication-for-power-bi/m-p/1087144/highlight/true#M95752" target="_blank"&gt;https://community.powerbi.com/t5/Service/Disabling-multi-factor-authentication-for-power-bi/m-p/1087144/highlight/true#M95752&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 11:20:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-disable-multi-factor-authentication-to-use-POwer-BI-REST/m-p/1091463#M23696</guid>
      <dc:creator>piper</dc:creator>
      <dc:date>2020-05-15T11:20:55Z</dc:date>
    </item>
  </channel>
</rss>

