Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
Need help on the below error, I am trying to embed the Power BI report in Dot Net application.
Issue is raised at the below highlighted line in the code, not sure what is the issue. Please help
Error: Operation returned an invalid status code 'Unauthorized''
Regards
Nagaraj
Solved! Go to Solution.
Hi @nagaraj ,
Accoring to offical document, the account must be the admin of the related workspaces when you need to embeded report in the application. You can check the details in this documentation.
Best Regards
Rena
Hi @nagaraj ,
This error message seems to be caused by insufficient permissions or incorrect authentication.Please check the solution in the following threads, hope they can help you.
Unauthorized error 401 for power reports embedding
Authentication fail when embedded application
Embed content within your application
Best Regards
Rena
Have already given access to all API's to the registered app.
Not sure any specific requests i need to provide at workspace level.
Regards
Nagaraj
Hi @nagaraj ,
Accoring to offical document, the account must be the admin of the related workspaces when you need to embeded report in the application. You can check the details in this documentation.
Best Regards
Rena
Thanks for the inputs.
Service Principle we are using is already an ADMIN in the premium Workspace.
And myself is also an ADMIN on this workspace.
I have downloaded Power BI Dotnet sample (App Owns Data), using that solution i can see my report is getting embed successfully. But when i try the same from other solution i am getting the error. (FYI ... For the client credential i am using the application id and application secret of the APP that i registered. If i pass Service Principle ID and Secret then it is saying unauthorized on this tenant).
Looks like some settings need to be performed on the Workspace or may be on the application i registered.
Regards
Nagaraj
Hi @nagaraj ,
Hope the following documentations can help you:
https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-troubleshoot#authentication
https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal
Best Regards
Rena
Thanks for the help, there was some issue with Service Principle.
Resolved it and the issue got resolved. Thanks
REgards
Nagaraj
Hi @nagaraj ,
Thanks for your feedback. Could you please share your solution if it is convenient? Then the other members in the community also can solve their issue based on your solution if they face the similar issue with you. And could you please mark this thread as Answered since the issue has been resolved? Thanks a lot.
Best Regards
Rena
Since i have was using a new Service principle which was not having the access to TENANT's the issue was there.
Now i have all the privileges and resolved the issue.
Regards
Nagaraj
I meet the same issue, could you detail your solution again, thanks
I am facing the same issue and can you help me on how you figured out that the service principal is not having access on the tenant.
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
114 | |
97 | |
95 | |
68 | |
65 |