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
Anonymous
Not applicable

Embed User Owns Data

So, I'm trying to include in my application a way of the user enters their username, password, and power BI URL so they can themselves embed the report.

By this, I suppose I should use the User Owns Data way for embedding the reports. To embed the report I'm trying to get the access token by fteching a POST request to "https://login.microsoftonline.com/common/oauth2/token" with the following body parameters:

 

client_id, username, password, resource (https://analysis.windows.net/powerbi/api), scope (openid), grant_type (password)

 

However, I'm getting the error:

 

"The user or administrator has not consented to use the application with ID 'xxxxxxxx' named 'AAAAA'. Send an interactive authorization request for this user and resource"

 

So, I wonder if this is the right way of getting access token for User Owns Data embedding in the scenario I described.

For example, only the user under my organization will be able to authenticate and embed reports or will it work for any kind of user who enters username/password?

0 REPLIES 0

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.

Top Kudoed Authors