cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jgoldsmith Occasional Visitor
Occasional Visitor

PowerBI Developer Example - Authentication Error

Hi, 

 

I am following the example at: https://github.com/Microsoft/PowerBI-Developer-Samples/tree/master/App%20Owns%20Data

Edit: specifically /App Owns Data/PowerBIEmbedded_AppOwnsData/Controllers/EmbedReport

var authenticationResult = await authenticationContext.AcquireTokenAsync(resourceUrl, clientId, credential);

 

 

After plugging in user credentials and ClientId I am getting the following error response to the access token request:

 

{"error":"invalid_client","error_description":"AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'..."}

 

I'm using the application id from Azure Portal -> App Registrations as the ClientId. I've set appropriate app permissions (https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedding-content/#appreg) and the user credentials work fine and have permission. 

 

It seems all of this stuff is in heavy flux. Please help get these dev examples working.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator Eric_Zhang
Moderator

Re: PowerBI Developer Example - Authentication Error

@jgoldsmith

The APP Owns Data demo requires a Native app, please ensure that you're not using a Web App.

Capture.PNG

View solution in original post

4 REPLIES 4
Moderator Eric_Zhang
Moderator

Re: PowerBI Developer Example - Authentication Error

@jgoldsmith

The APP Owns Data demo requires a Native app, please ensure that you're not using a Web App.

Capture.PNG

View solution in original post

alex_cook Frequent Visitor
Frequent Visitor

Re: PowerBI Developer Example - Authentication Error

What is a "native" app? When I login to Azure Portal, I don't see "native" app, I only see Web App or Mobile App. 

 

azure_portal_app.PNG

svenkle Occasional Visitor
Occasional Visitor

Re: PowerBI Developer Example - Authentication Error

"The demo requires a native app" is something thats sort of hard to find in any of the documentation. I got this to work by using dev.powerbi.com/apps and http://radacad.com/integrate-power-bi-into-your-application-part-1-register-your-app

Highlighted
leewsimpson Frequent Visitor
Frequent Visitor

Re: PowerBI Developer Example - Authentication Error

How did you get this solved?

 

Im running the example code locally - it starts as a web app.  I get the same error.

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Kudoed Authors