Forum Discussion
Headless authentication for API calls
Hi njrandell
Are you able to supply some more detail? I probably need some more info to get these functions working.
Cheers,
Phil
Have a look at https://github.com/sceneskope/powerbi
Admitedly the documentation isn't great, but I've had this working for the last few months and am happy to make it clearer if needed.
- Anonymous9 years agoNot applicable
I got my authentication running headless with passing a UserCredential instance to the AuthContext. Therefor I provide username and password. See also: https://github.com/Microsoft/PowerBI-Developer-Samples/blob/master/App%20Owns%20Data/PowerBIEmbedded_AppOwnsData/Controllers/HomeController.cs
They are using a UserPasswordCredential object, I am not aware of the differences of those two classes. But both should work headless.
- njrandell9 years agoHelper I
I'm using .Net core, and last time I checked those libraries don't support username and passwords. In fact I remember seeing a comment on github from one of the developers saying they won't add in username and passwords.
I'm using the libraries I created on github to push into power bi from a number of places, such as a raspberry pi running a dotnet core app, all the way through to a service fabric service running .net 452.
If you aren't using .Net core, then you are ok with the UserPasswordCredential object.