Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
human239874
Frequent Visitor

HTTP 401 returned when attempting to generate embed token for report

I am trying to generate an embed token so I can embed a Power BI report into my own web application. I am using the API Embed Token - Reports GenerateTokenInGroup.

 

POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/GenerateToken

 

I am passing in the groupId and the reportId as shown in the API. Below is a screen capture from Postman where I am setting the values.

Postman values 1.png

 

The API response I get is 401 Unauthorized. However I have all permissions possible within Azure (see screen capture).

 

azure power bi permissions.png

1 ACCEPTED SOLUTION
human239874
Frequent Visitor

I solved the issue. I did not have the proper permission (Access the directory as the signed-in user) set under Windows Azure Active Directory. Once I enabled this permission (see screen capture) I was able to generate an embed token for the report.

 

azure-permissions-2.png

View solution in original post

2 REPLIES 2
human239874
Frequent Visitor

I solved the issue. I did not have the proper permission (Access the directory as the signed-in user) set under Windows Azure Active Directory. Once I enabled this permission (see screen capture) I was able to generate an embed token for the report.

 

azure-permissions-2.png

Hello.
Where can I find this screen?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.