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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
toy
Advocate I
Advocate I

token is generated but getting 401 on embed report

hello all 

im running the standard sample from github which is here:

https://github.com/Microsoft/PowerBI-Developer-Samples

 

previously i adapted this for the .net core framework

and got it to work

 

but now im rebuilding for .net standard framework and its not working

im stepping thru just the sample (i havent made any code changes to sample other than passwords) - 

i can tell it generated the token

 

but when it goes to calling the report 

ie:  https://app.powerbi.com/reportEmbed?reportId=xxxxxx&groupId=xxxxxxxxx

it comes back with a 401

at line 532 in embed.ts

  node.appendChild(iframeContent); 

 

can anyone help me with some suggs here?

 

 

 ps: i tried the following endpoints

<add key="authorityUrl" value="https://login.windows.net/common/oauth2/authorize/" />
<add key="authorityUrl2" value="https://login.microsoftonline.com/common/oauth2/token" />
<add key="authorityUrl1" value="https://login.windows.net/common/oauth2/token/" />

 

 

1 ACCEPTED SOLUTION
toy
Advocate I
Advocate I

so after a little more investigation

apparently there was something up with chrome

 

the clue was when i went to 

https://app.powerbi.com

(ie, just generically - no call to any report) 

that i still got the 401

 

so i dumped my cache and restarted machine

bingo - im back

 

 

 

 

View solution in original post

2 REPLIES 2
toy
Advocate I
Advocate I

so after a little more investigation

apparently there was something up with chrome

 

the clue was when i went to 

https://app.powerbi.com

(ie, just generically - no call to any report) 

that i still got the 401

 

so i dumped my cache and restarted machine

bingo - im back

 

 

 

 

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @toy,

 

Which example is it? It seems the "App owns data". 

1. Did you build the project?

2. Did you get the web clientID and update it in the "Web.config"? 

3. Did you publish it to a website? (it could be Localhost)

4. Did you grant proper permission in the Azure portal?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.