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!

33 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. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.

    rpa training in chennai
    rpa training in bangalore
    rpa course in bangalore
    best rpa training in bangalore
    rpa online training

    ReplyDelete
  7. 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
  8. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
    Devops Training courses
    Devops Training in Bangalore
    Best Devops Training in pune
    Devops interview questions and answers

    ReplyDelete
  9. Greetings. I know this is somewhat off-topic, but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform like yours, and I’m having difficulty finding one? Thanks a lot.

    Advanced AWS Online Training | Advanced Online AWS Certification Course - Gangboard
    Best AWS Training in Chennai | Amazon Web Services Training Institute in Chennai Velachery, Tambaram, OMR
    Advanced AWS Training in Bangalore |Best AWS Training Institute in Bangalore BTMLA ,Marathahalli

    ReplyDelete
  10. Win here and now, come in and take your winnings great casino slot games play with us and be rich.

    ReplyDelete
  11. 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
  12. 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
  13. 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
  14. 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
  15. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.salesforce course in chennai

    software testing course in chennai

    robotic process automation rpa course in chennai

    blockchain course in chennai

    devops course in chennai

    ReplyDelete
  16. 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
  17. 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
  18. Digital marketing is the component of marketing that utilizes internet and online based digital technologies such as desktop computers, mobile phones and other digital media and platforms to promote products and services.
    Java training in chennai

    python training in chennai

    web designing and development training in chennai

    selenium training in chennai

    digital-marketing training in chennai

    ReplyDelete