<?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 The request failed with HTTP status 401: Unauthorized ReportingService2010.GetPolicies in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/The-request-failed-with-HTTP-status-401-Unauthorized/m-p/1000844#M13637</link>
    <description>&lt;P&gt;Dear Support Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing one Unauthorized issue when i am going to add specific user to Power bi report server dynamically.&lt;/P&gt;&lt;P&gt;I have used below code to get policies and assign the specific role to the the user to access the Power bi report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;  ReportingService2010 rs = new ReportingService2010();
                       
                            rs.Url = domain + "/ReportServer/ReportService2010.asmx";
                            rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
                            
                            var policies = !string.IsNullOrEmpty(directory) ? rs.GetPolicies("/" + directory, out isPolicies) : rs.GetPolicies("/", out isPolicies);//"/&amp;lt;your folder name&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code i used in my application, And it is working fine when i have the Power bi report server and application in same domain.&lt;/P&gt;&lt;P&gt;But when i have application in other domain and report server in other domain then getting below issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;STRONG&gt;The request failed with HTTP status 401: Unauthorized. &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;and Stacktrace : at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;at DevExpress_3D.ReportServerReference.ReportingService2010.GetPolicies(String ItemPath, Boolean&amp;amp; InheritParent)"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have verified the Reporting server web services in other domain and it is accessible.&lt;/P&gt;&lt;P&gt;Need your help to fix this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vikash&lt;/P&gt;</description>
    <pubDate>Tue, 31 Mar 2020 14:35:27 GMT</pubDate>
    <dc:creator>Healthec</dc:creator>
    <dc:date>2020-03-31T14:35:27Z</dc:date>
    <item>
      <title>The request failed with HTTP status 401: Unauthorized ReportingService2010.GetPolicies</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/The-request-failed-with-HTTP-status-401-Unauthorized/m-p/1000844#M13637</link>
      <description>&lt;P&gt;Dear Support Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing one Unauthorized issue when i am going to add specific user to Power bi report server dynamically.&lt;/P&gt;&lt;P&gt;I have used below code to get policies and assign the specific role to the the user to access the Power bi report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;  ReportingService2010 rs = new ReportingService2010();
                       
                            rs.Url = domain + "/ReportServer/ReportService2010.asmx";
                            rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
                            
                            var policies = !string.IsNullOrEmpty(directory) ? rs.GetPolicies("/" + directory, out isPolicies) : rs.GetPolicies("/", out isPolicies);//"/&amp;lt;your folder name&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code i used in my application, And it is working fine when i have the Power bi report server and application in same domain.&lt;/P&gt;&lt;P&gt;But when i have application in other domain and report server in other domain then getting below issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;STRONG&gt;The request failed with HTTP status 401: Unauthorized. &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;and Stacktrace : at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;at DevExpress_3D.ReportServerReference.ReportingService2010.GetPolicies(String ItemPath, Boolean&amp;amp; InheritParent)"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have verified the Reporting server web services in other domain and it is accessible.&lt;/P&gt;&lt;P&gt;Need your help to fix this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vikash&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 14:35:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/The-request-failed-with-HTTP-status-401-Unauthorized/m-p/1000844#M13637</guid>
      <dc:creator>Healthec</dc:creator>
      <dc:date>2020-03-31T14:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: The request failed with HTTP status 401: Unauthorized ReportingService2010.GetPolicies</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/The-request-failed-with-HTTP-status-401-Unauthorized/m-p/1014673#M13746</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found the solution for above issue asked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When report server and application was in same domain then in that case DefaultCredentials was working perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once we call the reporting service from other domain then found this issue and got the solution like for credentials we have to set the userid , password and domain to get the policies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, Everyone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 09:19:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/The-request-failed-with-HTTP-status-401-Unauthorized/m-p/1014673#M13746</guid>
      <dc:creator>Healthec</dc:creator>
      <dc:date>2020-04-08T09:19:37Z</dc:date>
    </item>
  </channel>
</rss>

