Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
When testing an embedded app in Power BI, I am able to get it working with "ServicePrincipal" authentication type, but when I use "MasterUser" authentication type, I get the following error message. What do I need to do to fix this?
----------------------
Error Details:
Operation returned an invalid status code 'Unauthorized'
at Microsoft.PowerBI.Api.EmbedTokenOperations.GenerateTokenWithHttpMessagesAsync(GenerateTokenRequestV2 requestParameters, Dictionary`2 customHeaders, CancellationToken cancellationToken)
at Microsoft.PowerBI.Api.EmbedTokenOperationsExtensions.GenerateTokenAsync(IEmbedTokenOperations operations, GenerateTokenRequestV2 requestParameters, CancellationToken cancellationToken)
at Microsoft.PowerBI.Api.EmbedTokenOperationsExtensions.GenerateToken(IEmbedTokenOperations operations, GenerateTokenRequestV2 requestParameters)
at AppOwnsData.Services.PbiEmbedService.GetEmbedToken(Guid reportId, IList`1 datasetIds, Guid targetWorkspaceId) in C:\PowerBI\PowerBI-Developer-Samples-master\.NET Core\Embed for your customers\AppOwnsData\Services\PbiEmbedService.cs:line 167
at AppOwnsData.Services.PbiEmbedService.GetEmbedParams(Guid workspaceId, Guid reportId, Guid additionalDatasetId) in C:\PowerBI\PowerBI-Developer-Samples-master\.NET Core\Embed for your customers\AppOwnsData\Services\PbiEmbedService.cs:line 75
at AppOwnsData.Controllers.EmbedInfoController.GetEmbedInfo() in C:\PowerBI\PowerBI-Developer-Samples-master\.NET Core\Embed for your customers\AppOwnsData\Controllers\EmbedInfoController.cs:line 45
Solved! Go to Solution.
I figured out the solution myself. I had to add "Content.Create" API permission to the application registered in AAD.
I figured out the solution myself. I had to add "Content.Create" API permission to the application registered in AAD.
thanks, but it not work for me, dont know why
Hi @Anonymous ,
Thank you for sharing your problem and solution. Please mark your solution, if someone has the same problem, it will be solved quickly.
Best Regards
Community Support Team _ chenwu zhu
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!