简体   繁体   中英

Login to Power BI with Power shell throws error “System.Net.WebException: The remote name could not be resolved: 'localhost.fiddler'”

When I'm trying to login to Power BI with Microsoft Power Shell ISE :

Login-PowerBI

from the Package: MicrosoftPowerBIMgmt , I'm getting the following error:

Failed to get ADAL token: Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The r emote name could not be resolved: 'localhost.fiddler' at System.Net.HttpWebRequest.EndGetResponse...

I had a similar problem with Visual Studio NuGet service .

When PowerShell tries to log in to Power BI account (when executing command Login-PowerBI ), it executes AzureADWindowsAuthenticator.exe , which looks for the configuration under:
MicrosoftPowerBIMgmt.Profileversion of power bi profilelibnetstandardWindowsAuthenticator directory.

The configuration file is called AzureADWindowsAuthenticator.exe.config .

To solve the problem edit the configuration file as Administrator and add the following under <configuration> section:

<system.net>
    <defaultProxy enabled="true" useDefaultCredentials="true">
        <proxy usesystemdefault="true" bypassonlocal="true" />
   </defaultProxy>
   <settings>
        <ipv6 enabled="true"/>
   </settings>
</system.net>

The final result should be like this:

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM