Forum Discussion
how to push data trough api
- 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/";
Hello!
To go further, I would like to refresh my data through API:
The first time, I add rows in the dataset I created, as explain before.
Once done, I would like to empty (or delete) the dataset to send new data
Jayendran, if you can help me, thanks in advance 🙂
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
- Anonymous6 years agoNot applicable
Hi Jayendran ,
It works with the deleteRowsInGroup; it seems a workspace is necessary...
thanks again