Power BI API Service Principal Account

  Рет қаралды 17,114

SQLBI

SQLBI

Күн бұрын

Only for developers: how to create a service principal account to be used with the Power BI API.
Special guest: Paolo Pialorsi piasys.com/techbites
Article and download: sql.bi/679872?aff=yt
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!

Пікірлер: 30
@TomH364
@TomH364 3 жыл бұрын
I'd give this 10 stars if I could. Fantastic and finally one place to go to to complete everything.
@avinashkhatri1986
@avinashkhatri1986 Жыл бұрын
Amazing tutorial! Kudos to content creator, if faced same problem with token generation and you killed it with explaning in detail . 12 out of 10 points :)
@dariush7272
@dariush7272 19 күн бұрын
I have to add my 100 Euros to the last comment, very good tutorial and you saved me a lot of time waste! grandi ragazzi!
@sergiomurru5055
@sergiomurru5055 3 жыл бұрын
Very interesting video! Thank you Marco and Paolo
@davepoleon
@davepoleon 3 жыл бұрын
Top class!...thank you.
@mcscunha
@mcscunha 3 жыл бұрын
EXCELENT!... I love this tutorial. It helps me too much! It was I needed. Thank you very much.
@muralichiyan
@muralichiyan Жыл бұрын
Nice keep rocking … We no need to buy azure embedded licenses for this right..?
@Bharath_PBI
@Bharath_PBI 3 жыл бұрын
Thank you for the video 👍 Look like SQLBI gets external users to view some reports 🙂 through embed app.
@chaddrobertson5805
@chaddrobertson5805 5 ай бұрын
This is a brilliant video. Thank you.
@frenamakenson9844
@frenamakenson9844 2 ай бұрын
thx for sharing
@neehargadam1613
@neehargadam1613 2 жыл бұрын
Clear Explanation. I'm able to get the Access token but not able to fetch the data (ex: get all workspaces). Please help
@nikhilev5180
@nikhilev5180 3 жыл бұрын
Great Video. I am new to power Bi. Can you make a video on how to do table partitioning using Service Principal Account?
@Marcel-dt5du
@Marcel-dt5du 2 жыл бұрын
Thanks for this, much appreciated. Still, I hate that application permissions are all-or-nothing. It would make sense to be able to scope access to specific PBI workspaces.
@Mgiusto
@Mgiusto Жыл бұрын
If the Service Principle account isn't a member of the PBI Workspace, doesn't that give you the limits you're seeking?
@anmfaisal964
@anmfaisal964 8 ай бұрын
Great tutorial. Thanks a lot . My question is when we delegate access for end users and it can be a case of row level security- how can we get the end users setup the application? Any chance you have a vdo on that!!
@thalialoiola1911
@thalialoiola1911 2 жыл бұрын
amazing tutorial! I loved it. Thanks for the video. Just one question: Is there any difference between getting token with MSAL or with another library? I'm using python (requests library) and I'm having trouble accessing admin APIs as a service principal. Thanks!
@SQLBI
@SQLBI 2 жыл бұрын
It should be good as well, as long as it is provided by Active Directory.
@Atgether
@Atgether Жыл бұрын
Hi, Thank you for this tutorial. Could you please tell if Tenant.Read.all application permission is enough if i will call exportToFile Api to export powerbi paginated report from one of the premium workspace?
@26263kutz
@26263kutz 2 жыл бұрын
Thankyou Marco for the video. I have a overview report with URL to paginated report with all the details. In the URL I am passing the link to paginated and the parameters(filter selections on my Overview report). This is working but loading/rendering of paginated report is taking time, after it loads user exports the data to excel. Requirement is avoid rendering and get data directly in excel - I think possible solution is to create a Web App and use "ExportTFile" Rest API. If you have any suggestion on the C# code please let me know.
@SalmanKhan-ol4sm
@SalmanKhan-ol4sm 3 жыл бұрын
Hi Marco. I followed all your steps properly and try to get all groups as admin with the access token obtained. But I am getting "PowerBINotAuthorizedException". What may be the reason?
@SQLBI
@SQLBI 3 жыл бұрын
Check if the service principal is enabled: docs.microsoft.com/en-us/power-bi/admin/service-premium-service-principal Manipulation of XMLA endpoint is not allowed to service principal in Power BI Premium per User (you need capacity), but this shouldn't affect the ability to user Power BI REST API.
@MrWLKNSN
@MrWLKNSN 3 жыл бұрын
This is for push datasets only. Is there a way to combine this with a normal dataset?
@marcorusso7472
@marcorusso7472 3 жыл бұрын
The goal of the video is to explain the authentication required to access the Power BI API. The push dataset is just an example. With XMLA endpoint you can use the TOM API to add rows to an existing partition. As of today, this is not possible in Power BI Pro because it doesn't expose the XMLA endpoint.
@MrWLKNSN
@MrWLKNSN 3 жыл бұрын
@@marcorusso7472 reply well appreciated! Will check tom api Thx
@dhawalpmehta
@dhawalpmehta 3 жыл бұрын
Why you are not using the Power BI Tenant setting to provide the permission for the Service Principal in Power BI instead of providing the API permission in the App Registration?
@SQLBI
@SQLBI 3 жыл бұрын
I'm not sure what you mean - the Power BI tenant setting is required (and it is active) but it is not enough to complete the permission required in this example.
@dhawalpmehta
@dhawalpmehta 3 жыл бұрын
@@SQLBI ohh ok, sorry I misunderstood it as somehow I didn't remember seeing that in the video. Thanks for your confirmation and all the videos. :)
@pritichaudhari7596
@pritichaudhari7596 10 ай бұрын
Hello, Would you please make a video on, how to get Data from RESTful API which has "two Factor Authentication" e.g. Maconomy RESTful API framework.
@pro1427
@pro1427 Жыл бұрын
Thanks for this tutorial! unfortunately i faced an annoying issue that i can´t solve, I was able to create an instance of ConfidentialClientApplication class, but i get an error " AADSTS50076: you must use multi-factor authentication to access", i don´t know how to solve... Any ideias would be great!!
Power Platform Service Account Vs. Service Principal
33:26
Daniel Christian
Рет қаралды 10 М.
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 29 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 6 МЛН
Power BI in Python | Authentication
30:30
Sigma Coding
Рет қаралды 13 М.
Power BI PowerShell and the Admin API
12:35
Guy in a Cube
Рет қаралды 33 М.
The Power BI Gateway   All You Need to Know
20:19
RADACAD
Рет қаралды 47 М.
Power BI Service Principals 101
9:23
Guy in a Cube
Рет қаралды 28 М.
Formula engine and storage engine in DAX
25:50
SQLBI
Рет қаралды 22 М.
НЕ ПОКУПАЙ СМАРТФОН, ПОКА НЕ УЗНАЕШЬ ЭТО! Не ошибись с выбором…
15:23
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 2,3 МЛН
Easy Art with AR Drawing App - Step by step for Beginners
0:27
Melli Art School
Рет қаралды 14 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 54 МЛН