Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

C# Application that Manages Power BI

Has anyone created a C# web application that manages a Power BI environment? Sort of a CRUD app (create, read, update, and delete)? I need to make one and the less I have to start from scratch, the better.

3 REPLIES 3
TedPattison
Employee
Employee

Here is a Visual Studio project with C# and ASP.NET MVC that I have been developing on and off for several month now called Workspace Manager.

 

http://internalshare.blob.core.windows.net/public/WorkspaceManager.zip

 

It authenticates a user with Azure AD and then it calls the Power BI Service API as that user. The user needs to be an admin because of what he app does. To run this demo app, you must create an Azure AD application and configure it will all the available delegated permissions for the Power BI Service API. Then copy the application ID, the app secret and a registered reply URL into the web.configure file and you should be able to start her up. 

 

Some of the code is still a bit rough but the app can do the folllowing.

  1. Provide the user with login/logout experience for Azure AD
  2. View, Create and Delete app workspaces
  3. Add a new workspace to a dedicated capcity.
  4. Import a PBIX file into a workspace
  5. View and refresh the datasets within a workspace
  6. View the refresh history and data sources for a dataset

 

There's lots more I want to add but this is where I have gotten so far. Let me know if you are able to get this C# ASP.NET MVC application up and running.

Anonymous
Not applicable

So far I'm getting this error:

 

Error		NuGet Package restore failed for project WorkspaceManager: Unable to find version '2.0.121817003' of package 'Microsoft.PowerBI.Api'.
  C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: Package 'Microsoft.PowerBI.Api.2.0.121817003' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\'.
  https://api.nuget.org/v3/index.json: Package 'Microsoft.PowerBI.Api.2.0.121817003' is not found on source 'https://api.nuget.org/v3/index.json'.
. Please see Error List window for detailed warnings and errors.				
Anonymous
Not applicable

Cool! Should we put this on github and colloborate? 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.