Forum Discussion

CRMPowerBI's avatar
CRMPowerBI
Microsoft Employee
10 years ago

Example Request: How to Authenticate (Silently) with Javascript to Power BI Rest API

Hello,

 

I am trying to create a client that will authenticate to PowerBI via JavaScript. I have attempted to use the ADAL JS but none of the examples actually show how to authenticate to a service... They show how to protect your service using ADAL, which I don't want. Or they show how to redirect you to a sign in page, which I don't want.

 

Any chance anyone has an example that uses JavaScript so I can grab some data and create my own dashboard.

 

Pretty please :-)

 

Thanks!

9 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Did you find a solution to this?

     

    Thanks

    • CRMPowerBI's avatar
      CRMPowerBI
      Microsoft Employee

      Nope, no answer.

       

      I am posted on the MSDN priority forums on how to do OATH2 "service" authentication (which is what I want to do here), using JavaScript and all I kept getting was pointed at the same sample over and over that isn't a client side authorization example (service), it's a SingularJS WebAPI controller method protection example using ADAL

       

      I am sure this is possible... just not something I have pieced together.

       

      Cheers.

      • JasonDunbar's avatar
        JasonDunbar
        Advocate II

        Hi there,

         

        Did you get any further with this... Seems we've also hit the same roadblock; trying to do this entirely in javascript. We know that we can host a Web Service somewhere to act as a proxy and get around the cross-domain challenge, but then we're not going to achieve what we set out to do: a pure client-scripted approach that we can embed anywhere.

         

        Would be great if you could provide an update on where you're at with this...

         

        Jason