Forum Discussion

Harineeeeeeee's avatar
2 years ago
Solved

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

7 Replies

    • Harineeeeeeee's avatar
      Harineeeeeeee
      Icon for Helper I rankHelper I

      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 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Harineeeeeeee 

     

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

    Then you can use service principal to authenticate:

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

    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.

    • Harineeeeeeee's avatar
      Harineeeeeeee
      Icon for Helper I rankHelper I

      Anonymous  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 !