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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors