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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. 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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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