Setting up reports for on-premises Alvao with Entra ID
Technical requirements
- Alvao on-premises installation
- MS Entra authentication to Alvao
- Alvao REST API accessible from the Internet
- Custom domain verified in MS Entra Custom Domains
- Power BI Desktop updated to the newest version
Set up IIS
First, we need to create a dedicated copy of the AlvaoRestApi application to serve reporting data.
-
In Application Pools - Add Application Pool:
- Name:
AlvaoRestApiReports AppPool - All other settings (for example, AppPool identity) should be the same as for the AlvaoRestApi AppPool.
- Name:
-
In Sites – Default Web Site – Add Application:
- Alias:
AlvaoRestApiReports - Application pool:
AlvaoRestApiReports AppPool - Physical path: same as for the AlvaoRestApi app (for example,
C:\inetpub\wwwroot\AlvaoRestApi) - Click OK.
- Alias:
-
Open
https://<server>/AlvaoRestApiReportsin a web browser and ensure that the application is running correctly. It should return the same information as the original AlvaoRestApi app. -
Make AlvaoRestApiReports accessible from your public domain, for example,
https://contoso.com/AlvaoRestApiReports. -
In the installation path of the AlvaoRestApi (for example,
C:\inetpub\wwwroot\AlvaoRestApi) open web.config and remove line:<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" /> -
Open a command prompt as an administrator and run the following commands:
cd C:\Windows\system32\inetsrv.\appcmd.exe set config -section:system.applicationHost/applicationPools /+"[name='AlvaoRestApiReports AppPool'].environmentVariables.[name='ASPNETCORE_ENVIRONMENT',value='Reports']".\appcmd.exe set config -section:system.applicationHost/applicationPools /+"[name='AlvaoRestApi AppPool'].environmentVariables.[name='ASPNETCORE_ENVIRONMENT',value='Production']"You can check the ASPNETCORE_ENVIRONMENT variables for the app pools using the following commands:
.\appcmd.exe list apppool "AlvaoRestApi AppPool" /config.\appcmd.exe list apppool "AlvaoRestApiReports AppPool" /config
Set up MS Entra
We need to create a new app registration in MS Entra that will be used just for authentication in Power BI.
- In App registrations - New registration, register an application:
- Name:
AlvaoRestApi Reports
- Name:
- In AlvaoRestApi Reports – Expose an API
-
Set Application ID URI to public URL of the AlvaoRestApiReports app, for example,
https://contoso.com/AlvaoRestApiReports.You need to verify your domain ownership in the Domain Names service first
-
Click Add a scope:
- Name:
Reports - Who can consent?:
Admins and users - Admin consent display name:
Alvao Reports - Admin consent description:
Allows users to connect to Alvao Reports - State:
Enabled
- Name:
-
Click Add a client application:
- ClientID:
b52893c8-bc2e-47fc-918b-77022b299bbc - Authorized scopes: select the previously added scope
This is a confidential client used in the Power BI service.
- ClientID:
-
Click Add a client application:
- ClientID:
a672d62c-fc7b-4e81-a576-e60dc46e951d - Authorized scopes: select the previously added scope
This is a public client used in Power BI Desktop and the gateway.
- ClientID:
-
Finish the configuration
-
In the installation path of the AlvaoRestApi, create a new file appsettings.Reports.json with:
-
attribute AAD_ApplicationId set to the Application (client) ID of the AlvaoRestApi Reports app registration created in the previous steps.
-
attribute AAD_AdditionalAudience set to the Application ID URL from your app registration, for example:
{"AAD_ApplicationId": "f3adada9-c73e-4b86-b30e-c86bc6ce0a93","AAD_AdditionalAudience": "https://contoso.com/AlvaoRestApiReports"}
-
-
Open AlvaoRestApiReports/v1/systemSettings (for example,
https://contoso.com/AlvaoRestApiReports/v1/systemSettings) in a browser and check that addClientId in the response is set to AAD_ApplicationId from the previous step. -
Do the same check for /AlvaoRestApi. It should return the clientId set in the AzureApplicationId property.
Load data to Power BI report
Follow the on-premises procedure in Setting up Power BI reports, and connect your report to the AlvaoRestApiReports app (for example, https://contoso.com/AlvaoRestApiReports) created in the previous steps.