Forum Discussion
bfinnegan7675
3 years agoNew Member
PowerBI Rest API C# throwing 'Operation returned an invalid status code 'Unauthorized''
Hey all, I've been following some tutorials and am trying to access some reports from our Power BI instance. I can successfully authenticate and get a Bearer Auth token, but when using my PowerBI...
AntrikshSharma
3 years agoCommunity Champion
var authResult = await accessTokenRequest.ExecuteAsync();
// This should be
var authResult = await accessTokenRequest.ExecuteAsync().Result;
Make sure that the app has access to workspaces, that's the issue I also faced, I created the application but didn't think of giving access to workspaces.
Also check if the required API Permissions are granted in Azure Appp Registrations.