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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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