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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
wikap
New Member

Dynamics 365 Sales On-premise (IFD) Connection using oAuth Server to server authentication

Hi PowerBI'ers

Trying to connect Power BI directly to an on-premise environment where IFD and server to server oAuth authentication is enabled. I use Kingsway and it connects fine with the client id and client secret provided, but can anyone in this community tell me if this authentication method is allowed using Power BI? And if yes, can you point me in direction to documentation on this, so I can make it work?

 

/Henrik

 

Tags: Dynamics 365 Sales, Dynamics CRM, Dataverse, Common Data Service, CDS

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @wikap ,

As far as I know, the OAuth authentication type allows an extension to implement custom logic for their service. To do this, an extension will provide functions for StartLogin (returning the authorization URI to initiate the OAuth flow) and FinishLogin (exchanging the authorization code for an access token). Extensions can optionally implement Refresh (exchanging a refresh token for a new access token) and Logout (expiring the current refresh and access tokens) functions as well.

Refer this document: https://github.com/Microsoft/DataConnectors/blob/master/docs/m-extensions.md#implementing-an-oauth-f... 

 

To connect to Dynamics in power bi, you can use the dynamics connector directly.

Please refer this tutorial which introduces it in details, hopes it could help.

  1. How to Connect to Dynamics 365 Data from PowerBI Desktop 
  2. How to Connect Power BI to Dynamics 365 
  3. API Strategies with Power BI 

 

Best Regards,
Community Support Team _ Yingjie Li
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

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @wikap ,

As far as I know, the OAuth authentication type allows an extension to implement custom logic for their service. To do this, an extension will provide functions for StartLogin (returning the authorization URI to initiate the OAuth flow) and FinishLogin (exchanging the authorization code for an access token). Extensions can optionally implement Refresh (exchanging a refresh token for a new access token) and Logout (expiring the current refresh and access tokens) functions as well.

Refer this document: https://github.com/Microsoft/DataConnectors/blob/master/docs/m-extensions.md#implementing-an-oauth-f... 

 

To connect to Dynamics in power bi, you can use the dynamics connector directly.

Please refer this tutorial which introduces it in details, hopes it could help.

  1. How to Connect to Dynamics 365 Data from PowerBI Desktop 
  2. How to Connect Power BI to Dynamics 365 
  3. API Strategies with Power BI 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear V Yingjl

First I want to thank you a thousand times for taking your time to write me a detailed answer. I really appreciate this!

 

Option 1,2 & 3 I'm already familiar with, but because of a very complex authentication setup on these servers, I don't have these direct options. I is a on-premise Dynamics 365 Sales setup using complex multiple ways to login.

 

That said, I have no problems connecting to the environment from my Kingsway Adapter using a client id/secret. So it must be possible for Power BI to use the same 'hole'.

 

I've tried to follow you github example and various other sites I've googled based on your suggestions. But my hard core developer skills are not sufficiant even when it sounds quite simpe if you know you way.

This leads me to my last question: do you know a person who have tried this before and who can code this adapter for me using the setup you suggest? Please contact me directly by e-mail (just google my name and company located in Denmark). I would appreciate a short contact also if you do not know any person.

BR, Henrik (from WIKAP)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors