Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
We have a .NET Core application that embeds reports to web pages using the "User Owns Data" model. We assigned an Office 365 group as "Viewer" of the Workspace, but users of that group are getting 401 Unauthorized error when calling the GetReportInGroupAsync method. I assume users should get the "Viewer" permission through the group. How can we solve this problem? Thank you!
Solved! Go to Solution.
Hi @bwang1 ,
According to the error message, it seems that the "group" making the API call may not have sufficient privileges to access the reports. Make sure that the "group" has been granted the appropriate permissions in Azure AD and Power BI. I found the following thread which has the similar problem as yours, hope it can help you solve the problem.
For Service Principal to work for any embedding, you need to enable Service Principal option in Power BI Admin portal and then, add it to the Power BI workspace.
Please check the following once:
- Check if service principal is enabled under Admin portal in Power BI service. Follow step 3 onwards
- If things don't work for you after following the above step, try embedding with the developer sample
Besides, based on your code it looks like you are using ADAL library for authentication. Microsoft recommends to use MSAL library for authentication with Azure AD entities.
Also, you can use certificate instead of app secret for service principal authentication. (Docs)
Best Regards
Hi @bwang1 ,
According to the error message, it seems that the "group" making the API call may not have sufficient privileges to access the reports. Make sure that the "group" has been granted the appropriate permissions in Azure AD and Power BI. I found the following thread which has the similar problem as yours, hope it can help you solve the problem.
For Service Principal to work for any embedding, you need to enable Service Principal option in Power BI Admin portal and then, add it to the Power BI workspace.
Please check the following once:
- Check if service principal is enabled under Admin portal in Power BI service. Follow step 3 onwards
- If things don't work for you after following the above step, try embedding with the developer sample
Besides, based on your code it looks like you are using ADAL library for authentication. Microsoft recommends to use MSAL library for authentication with Azure AD entities.
Also, you can use certificate instead of app secret for service principal authentication. (Docs)
Best Regards
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |