Forum Discussion
Anonymous
6 years agoNot applicable
how to push data trough api
Hello, I'm following this tutorial: https://docs.microsoft.com/fr-fr/power-bi/developer/walkthrough-push-data I choosed a native application type in the first step, what should I use for the di...
- 6 years ago
Hi Anonymous ,
Ok the document is out-dated. Please follow my instruction as below
1. Update the nuget package manager for the Microsoft.IdentityModel.Clients.ActiveDirectory
Install-Package Microsoft.IdentityModel.Clients.ActiveDirectory -Version 4.5.1.02. update your code like below
AuthenticationContext authContext = new AuthenticationContext(authorityUri); //update with your master account email and password var userCreds = new UserPasswordCredential("[email protected]", "myEasyToCrackPassword"); var userAuthnResult = authContext.AcquireTokenAsync(resourceUri, clientID, userCreds).Result; string token=userAuthnResult.AccessToken;You don't need the redirect url at all.
ResourceUri and authorityurl remains same as
string resourceUri = "https://analysis.windows.net/powerbi/api"; //OAuth2 authority Uri string authorityUri = "https://login.microsoftonline.com/common/";
Jayendran
6 years agoSolution Sage
Hi Anonymous ,
Could you please check whether the below conditions
Also I couldn't able to read the error properly as the screenshot not in english
Anonymous
6 years agoNot applicable
Hi Jayendran ,
It works with the deleteRowsInGroup; it seems a workspace is necessary...
thanks again