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

泪湿孤枕 提交于 2021-01-27 17:33:35

问题


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...


回答1:


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:



来源:https://stackoverflow.com/questions/61464687/login-to-power-bi-with-power-shell-throws-error-system-net-webexception-the-re

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!