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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Harineeeeeeee
Helper I
Helper I

Connecting to dataverse from PowerBI using client id , client secret

Hi ,

 

I am trying to connect to dataverse from PowerBI, I have only this info tenant id, client id, client secret and env url based on the info I have wrote a power query as below, but this is not giving the desired dataverse tables

rather data format error : we found extra characters at the end of the json output I want the output in tables in PowerBI 

 

let

Tenantid =“xx",
ClientID = "xx”
ClientSecret = “xx",
Authority = *https://login.microsoftonline.com/"& TenantID &"/oauth2/token*
headers = [#"Accept"="application/json*, #"Content-Type"="application/x-www-form-urlencoded*],
postBody = [grant_type ="client_credentials"
Client_id = “xx”,
client_secret = "xxx”,
#"Converted to Table" = Record. ToTable(postBody),
response = Json. Document (Web. Contents (Authority))
In
response

 

 

can some please assist?

thanks in advance

1 ACCEPTED SOLUTION

Hi @Harineeeeeeee 

 

You need to add the App registrations to the Security group and add the security to the Dataverse environment, so that you can use the security principal to authenticate.

Here for your reference:

Control user access to environments: security groups and licenses - Power Platform | Microsoft Learn

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-zhengdxu-msft
Community Support
Community Support

Hi @Harineeeeeeee 

 

Maybe you can create a dataflow in power bi service to connect to Dataverse:

vzhengdxumsft_0-1725245071794.png

Then you can use service principal to authenticate:

vzhengdxumsft_1-1725245126866.png

So that you can get data from dataflow in power bi desktop:

vzhengdxumsft_2-1725245276966.png

Here for your reference:

Create your first Microsoft Fabric dataflow - Microsoft Fabric | Microsoft Learn

Creating a dataflow - Power BI | Microsoft Learn

 

 

Hope it helps.

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-zhengdxu-msft  Hi thank you for suggesting this when I tried approaching in the dataflow it says invalid credentials should I need a also configure a gateway for this? Will that help ?

bcoz my cress are right !

Hi @Harineeeeeeee 

 

You need to add the App registrations to the Security group and add the security to the Dataverse environment, so that you can use the security principal to authenticate.

Here for your reference:

Control user access to environments: security groups and licenses - Power Platform | Microsoft Learn

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey @v-zhengdxu-msft  thanks for this, it worked but when I import the dataflows to local desktop the tables are empty! 

Hi @Harineeeeeeee 

 

Please check if there are any data in your dataflow.

vzhengdxumsft_3-1725412631808.png

 

After you've created your dataflow, you'll need to wait for it to refresh before you can connect.

In general, this may continue for a while

vzhengdxumsft_2-1725412497838.png

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Why not use the standard connector?

 

lbendlin_0-1725062024119.png

 

Hi @lbendlin  the standard connector allows only organisational account as credentials I don't have option to tie out with service account , also I have this info client id, client name , tenant id and client secret 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.