Forum Discussion
Power BI API authorization issue through Office 365 group
- Anonymous3 years ago
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