Wednesday, August 9, 2017

Connecting Dynamics 365 On-Premise to Power BI

If you're looking to setup the integration between Dynamics 365 On-Premise (using IFD) and Power BI, you may stumble upon this lovely TechNet: https://technet.microsoft.com/en-us/library/dn708055.aspx#PBI_op

All seems great, right? Well, that would be the case if all the steps were accurate...

To start, the PowerShell commands in step 1 to enable OAuth on the Dynamics 365 Server just do not work. The first three will work fine but upon execution of the 4th to actually set the change, it will throw an error. Instead, use this syntax to accomplish the same thing:

Add-PSSnapin Microsoft.Crm.PowerShell
$ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
$ClaimsSettings.Enabled = $true
Set-CrmSetting -Setting $ClaimsSettings

Afterwards, run Get-CrmSetting -SettingType OAuthClaimsSettings and you should see enabled set to "True" as shown below.



Moving onward to step 3 in the process where we register the Power BI Desktop OAuth 2.0 client with ADFS. You will notice in the instructions that it states "open a Windows PowerShell window and run the following PowerShell command on the PC where you are running Power BI Desktop". This is simply wrong. The "Add-AdfsClient" command is for... ADFS. Shocking, I know. So ignore the statement about the PC running Power BI and run the command provided on your ADFS server instead. Luckily, this one is correct and works. If you run Get-AdfsClient afterwards, you will see the addition of Power BI.


One last helpful tip - When copying commands from websites (even here), I always recommend pasting into Notepad before bringing them where they need to be executed (e.g. SSMS, PowerShell, etc...). This will get rid of any problematic formatting.

That's really it from a server perspective. Best of luck!

28 comments:

  1. I kept running into errors following the original guide. Spent a fair bit of time searching and reading up on error codes, fairly frustrating! Finally went back to the start and stumbled across your site... Thank you!!! Everything worked perfectly, great post.

    ReplyDelete
    Replies
    1. I'm glad to hear this was able to help you out! Thanks for the feedback!

      Delete
  2. Hi,

    I tried to use commands given by you on crm server machine. But getting error in line 2 $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
    error:the caller was not authenticated by the service.

    Not able to attach the screenshot here. If you need more info. regarding my error please share the appropriate email id where i can share screenshot of error.

    Appreciate your help in advance.

    Regards
    Anu

    ReplyDelete
    Replies
    1. It sounds like you may have a connectivity or permissions issue to CRM/D365. I would start with checking permissions - Is the account you are trying to run the commands as a local admin on both the CRM/D365 and ADFS servers as well as a system admin within the CRM/D365 application?

      Delete
    2. We tried with both admin(local & system) still the error is same. Please suggest.

      Regards
      Anu

      Delete
  3. Hi Gage, great write-up. We discovered this the hard way. We got this working with our DEV CRM, but on our QA & PROD CRM (different CRM server, same ADFS), we get an error:

    "The WWW-Authenticate header doesn't contain a valid authorization URI. Header value: 'Negotiate,NTLM'.

    We tried using "Grant-AdfsApplicationPermission" to grant Power BI permissions to the other trusts, but apparently that only works on Windows 2016. Have you come across how to do this on Windows 2012 R2?

    ReplyDelete
    Replies
    1. Hi there. Thanks for the feedback. Sorry but no, I have not seen that behavior at all.

      Delete
    2. Hi,
      We are facing same issue.Is there any work around to resolve this issue in Windows Server 2012 R2?

      Delete
  4. It would have been the happiest moment for you,I mean if we have been waiting for something to happen and when it happens we forgot all hardwork and wait for getting that happened.

    angularjs Training in marathahalli

    angularjs interview questions and answers

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs Training in chennai

    automation anywhere online Training

    ReplyDelete
  5. Fantastic work! This is the type of information that should follow collective approximately the web. Embarrassment captivating position Google for not positioning this transmit higher! Enlarge taking place greater than and visit my web situate

    Java training in Bangalore | Java training in Rajaji nagar

    Java training in Bangalore | Java training in Marathahalli

    Java training in Bangalore | Java training in Btm layout

    Java training in Bangalore | Java training in Marathahalli

    ReplyDelete
  6. Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us
    python training institute in marathahalli
    python training institute in btm
    Python training course in Chennai

    ReplyDelete
  7. I am happy for sharing on this blog its awesome blog I really impressed. thanks for sharing.

    Upgrade your career Learn Oracle Training from industry experts get Complete hands-on Training, Interview preparation, and Job Assistance at Softgen Infotech Located in BTM Layout.

    ReplyDelete
  8. Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing.

    AWS training in chennai | AWS training in anna nagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery

    ReplyDelete
  9. nice work! This is the type of information that should follow the web. Embarrassment captivating position Google for not positioning this transmit higher!..thanks for sharing this page,...
    AngularJS training in chennai | AngularJS training in anna nagar | AngularJS training in omr | AngularJS training in porur | AngularJS training in tambaram | AngularJS training in velachery

    ReplyDelete
  10. I found Hubwit as a transparent s ite, a social hub which is a conglomerate of Buyers and Sellers who are ready to offer online digital consultancy at decent cost. cold canvassing meaning
    Angular js Training in Chennai

    Angular js Training in Velachery

    Angular js Training in Tambaram

    Angular js Training in Porur

    Angular js Training in Omr

    Angular js Training in Annanagar

    ReplyDelete
  11. Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us
    IELTS Coaching in chennai

    German Classes in Chennai

    GRE Coaching Classes in Chennai

    TOEFL Coaching in Chennai

    Spoken english classes in chennai | Communication training

    ReplyDelete
  12. Hello,This is really too useful and have more ideas from yours. keep sharing many techniques. eagerly waiting for your new blog and useful information……nice…….
    Aws Training in Chennai

    Aws Training in Velachery

    Aws Training in Tambaram

    Aws Training in Porur

    Aws Training in Omr

    Aws Training in Annanagar

    ReplyDelete
  13. Slots & Casinos - Dr.MD
    If you're looking 포항 출장샵 for the ultimate place to play slots & casinos 정읍 출장안마 online, here is the game for you. Get a 대구광역 출장샵 $50 bonus 안산 출장샵 at 김제 출장샵 any casino today!

    ReplyDelete
  14. How to Hack Wi-Fi password in PC with easy steps: In this how to crack WiFi tutorial, we will introduce you to common techniques used. Wifi Cracko

    ReplyDelete
  15. ShareMouse Crack With Serial Key Free. ShareMouse Activation Key helps you choose between Unprotected Mode and Protected Mode from this tab ShareMouse Crack

    ReplyDelete
  16. Unique Merry Christmas wishes, messages, quotes and memories to help you write their Christmas card! Knowing what to write on the message of you Short Christmas Message

    ReplyDelete