Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 18041

OAuth for Power BI Custom Connector issues

$
0
0

Hello all!

 

I am hoping that someone has a solution or guidance.  The documentation for using OAuth in custom connectors for Power BI leaves a lot to be desired.....

 

Here is the experiene I am trying to create when setting up the connector in Power BI Desktop.  I am new to M Language, so I'm having trouble understanding the standard OAuth flow.

 

  1. When setting up the connector, the user enters the base url for the data source, a client ID, and client Secret.
  2. These variables get passed into the OAuth flow for the connector to retrieve an API Token that can be appended to the header of REST API requests.  The token is generated once, and reused for each 'page' of data retrieved with the request (my data source returns a max of 50 records with each request, so pagination will be necessary).

Where I am having an issue is that my data source doesn't follow the prescribed path for OAuth in Power BI connectors - the API Token is generated with a POST to {client_id}:{client_secret}@{baseurl}/rest/oath/token and a body with grant_type = client_credentials.  This API call returns a JSON with access_token that can then be stored as a variable applied in the header.

 

Here is a screenshot from Postman of a successful token request:

 

Screenshot 2024-03-12 at 2.44.02 PM.png

 

Basically, it does not seem like I need the StartLogin section, or I'm not sure what to put in that section since there is no authorization URL, just a token request URL.

 

Any guidance on this would be GREATLY appreciated.


Viewing all articles
Browse latest Browse all 18041

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>