This sample provides a starter web application for Power BI embedding using .NET Core 3.1 and the new Microsoft Authentication Library named Microsoft.Identity.Web
. You can use this sample application to create your own Power BI embedding prototype.
To run this sample application on your development workstation you must meet the following prerequisites. Your developer workstation must be configured to allow for the execution of PowerShell scripts. Your developer workstation must also have the following software and developer tools installed.
- PowerShell cmdlet library for AzureAD - download
- DOTNET Core SDK 3.1 or later - download
- Node.js - download
- Visual Studio Code] - download
- Visual Studio 2019 (optional) - download
Once you have installed the prequisite software and developer tools, you must complete the following steps to run this sample application on your development workstation.
- Download the code for the AppOwnsData project.
- Download the ZIP archive with the AppOwnsData project or
- Run the GIT command
git clone https://github.com/PowerBiDevCamp/NetCore-AppOwnsData.git
- Open the AppOwnsData project in Visual Studio Code.
- Run the PowerShell script named
CreateAzureADApplication.ps1
to create a new Azure AD application.- When you run the open Notepad with JSON configuration data for the Azure AD application
- You must copy this JSON into the clipboard for the next step
- Paste the JSON configuration data for the Azure AD Application into
appsettings.json
. - Open the Visual Studio Code console and run these commands.
npm install npm run build dotnet dev-cert https --clean dotnet dev-cert https --trust dotnet restore dotnet run