Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48289

Acquired token gives 401 Unauthorized when trying to create DataSet

$
0
0

Hi

im building an app to push data to a dataset in Power Bi

 

the token i got from azure does not seam to have te persissions i gave til ap in "app registrations"

the code om using to acquire the token is 

 

string resourceUri = "https://analysis.windows.net/powerbi/api";string authorityUri = "https://login.windows.net/common/";           AuthenticationContext authenticationContext = new AuthenticationContext(authorityUri);var AuthResult = authenticationContext.AcquireTokenAsync(resourceUrinew ClientCredential(ClientIDAppSecret)).Result;return AuthResult.AccessToken;

and the permissions that is grated in azure ad

pbi.png

but when i try to create the dataset it gives me an 401

i can create the dataset when i generate the token for a user with powershell but not with the token generated from client_id and client_secret

 

Hope you can help

 


Viewing all articles
Browse latest Browse all 48289

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>