Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear Support Team,
I am facing one Unauthorized issue when i am going to add specific user to Power bi report server dynamically.
I have used below code to get policies and assign the specific role to the the user to access the Power bi report.
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);//"/<your folder name>"
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.
But when i have application in other domain and report server in other domain then getting below issue:
"The request failed with HTTP status 401: Unauthorized.
and Stacktrace : at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at DevExpress_3D.ReportServerReference.ReportingService2010.GetPolicies(String ItemPath, Boolean& InheritParent)"
I have verified the Reporting server web services in other domain and it is accessible.
Need your help to fix this issue.
Thanks,
Vikash
Solved! Go to Solution.
Hi All,
I have found the solution for above issue asked.
When report server and application was in same domain then in that case DefaultCredentials was working perfectly.
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.
Thank you, Everyone.
Hi All,
I have found the solution for above issue asked.
When report server and application was in same domain then in that case DefaultCredentials was working perfectly.
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.
Thank you, Everyone.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
6 | |
4 | |
3 | |
2 |
User | Count |
---|---|
14 | |
11 | |
5 | |
5 | |
3 |