Power BI API Service Principal Account

Only for developers: how to create a service principal account to be used with the Power BI API.
Special guest: Paolo Pialorsi

00:00 Presentation
01:00 Description of the demo: an application pushes data in real-time onto a dataset. We already have the code of the application, but we need the authentication token for the service principal account of the application.
04:40 Description of the access token required
05:00 Registering the application in Azure Active Directory
07:10 Retrieving the Client ID to use in the authentication API
08:14 Retrieving the Tenant ID to use in the authentication API
08:45 Creating and retrieving the Client Secret to use in the authentication API
11:25 Setting the API permission for the application in Azure Active Directory
16:09 Introduction to MSAL (Microsoft Authentication Library)
17:29 Introducing the code to obtain the access token
18:09 Using the ConfidentialClientiApplicationBuilder class
18:53 Recap of how to use Client ID, Tenant ID, and Client Secret in the code
19:52 Declaring permission scopes required in the access token
21:20 Recap of permission scopes required by Power BI API
23:47 Sending the request and acquiring the token
25:40 First run of the application; description of the access token content and its caching.
29:08 Final demo, report updated in real-time!