Forum Discussion
Example Request: How to Authenticate (Silently) with Javascript to Power BI Rest API
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.
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
- CRMPowerBI10 years ago
Microsoft Employee
Sorry I didn't get anywhere on this.
Doesn't seem possible. If it is, it's such a closely regarded secret no one wants to tell.... Stinks, if you want to create cross domain , cross platform non-aspx pages, how in the world are you supposed to do it, if you can't authenticate.
- fabrice10 years agoFrequent Visitor
Hi guys.
CRMPowerBI when you say that you've constantly pointed to the same example, did you mean this one?
Here is my understanding of what adal.js is, and why you have to create a proxy :
- Adal.js is a lib to authenticate users against a directory which is hosted on azure.
- Authentication is the process of ascertaining that somebody really is who he claims to be.
- OAuth2 implicit grant, which is supported by Adal.js is about obtaining a token (to signing in the user), for accessing our own backend API.
But, there might be a solution if you want to choose the client side route, as stated in this stackoverflow thread.
Hope this helps.
- CRMPowerBI10 years ago
Microsoft Employee
Thank you for that pointer.
I will see how to make this productionizable and hopefully that will be possible.
It would be / will be nice when the BI team creates a sample. It will be harder and harder to expect people to "login" each time to select things to show, especially at an integration into other apps.
Cheers and thank you very much