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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.