cancel
Showing results for 
Search instead for 
Did you mean: 
0

EmbedForCustomer NodeJS Sample keep failing with 403 Forbidden error

I went through the

aka.ms/EmbedForCustomer

Using nodejs Sample under

PowerBI-Developer-Samples/NodeJS/Embed for your customers/AppOwnsData/

 Sample 'Supply Chain Sample' is setup in my powerBi instance with Admin Org access.

 

I keep getting below error, any help will be appreciated. 

Request URL: http://localhost:5300/getEmbedToken
Request Method: GET
Status Code: 403 Forbidden
Remote Address: [::1]:5300
Referrer Policy: strict-origin-when-cross-origin

 

Thanking you.

Status: Delivered

Hi @Jamir 

I am so glad to hear that your have fixed your issue . Thanks for your sharing .

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
Ailsa-msft
Community Support
Status changed to: Needs Info

Hi @Jamir

What did you do when the error happened ? Can you access the report normally before ?

 

Best Regards,
Community Support Team _ Ailsa Tao

Jamir
Frequent Visitor

Hi @Ailsa-msft 

Report runs fine within PowerBI, I followed steps using 

aka.ms/EmbedForCustomer

for NodeJS

Downloaded code from GitHub, made necessary change based on insutruction, after  'npm start'

when I run the application using localhost:5300

it tries to connct to PowerBI based on config file, and it fails to connect with error as described earlier.. most likely it is complaining about CORS.. Not sure if that is the case. 

I pretty new to Power BI as well as how Embed would work.. but, my understanding is that sample should work out of the box, when we follow all steps and don't make any additional change.

 

Jamir
Frequent Visitor

I changed authentication mode from manageduser to serviceprincipal, it worked.

"authenticationMode": "serviceprincipal"
Ailsa-msft
Community Support
Status changed to: Delivered

Hi @Jamir 

I am so glad to hear that your have fixed your issue . Thanks for your sharing .

 

Best Regards,
Community Support Team _ Ailsa Tao