Issues connecting to Dynamics365 Online Data Source

  • 1
  • Problem
  • Updated 2 years ago
  • In Progress
This is on the same Skuid Site where this SSO issue was resolved.

No audio in video.

Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
Hi Pat, did you notice if any popups were blocked by your browser? Not Skuid popups, but browser popups related to authentication into the data source. If any were blocked, try unblocking/allowing them, and see if you're prompted to authenticate into Dynamics365.
(Edited)
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
I wish it was the case, but alas no. :(

There is an error in the console though.

Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Pat,

You're seeing something different than the tutorial because you're on Skuid Platform. Right the data source creation between Skuid on Salesforce and Skuid Platform is somewhat different (and the tutorial follows the process in Skuid on Salesforce). Our developers are working to make the process the same between the two.

Try using https://your-company-name.dynamics.com/api/data/v8.1/ as the datasource url. 
<br>
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
These URLs produce JSON. But they aren't working as a Data Source.

https://ip.crm3.dynamics.com/api/data/v8.1
https://ip.crm3.dynamics.com/api/data/v8.2
https://ip.api.crm3.dynamics.com/api/data/v8.1/
https://ip.api.crm3.dynamics.com/api/data/v8.2/
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Currently this error.

There was an error enabling the metadata cache: invalid_request
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Switching things up I get this error.

There was an error enabling the metadata cache: HTTP Error 401 - Unauthorized: Access is denied
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Hmmm, maybe it's a problem in your authentication provider? Would you mind posting a screenshot of it?

Do you have something like these for your authorize endpoint and token endpoint in your auth provider:

https://login.windows.net/common/oauth2/authorize?resource=https%3A%2F%2Fcompany-name.api.crm.dynamics.com%2F<br>https://login.windows.net/common/oauth2/token
(Edited)
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Hey David,

This really isn't my wheelhouse. I'm like the janitor in the Nasa control room. "Er .... uh ... what's this button do? Dunno but I'm pressing it." :D

Can you  help me with this?

Pat
Photo of David Giger

David Giger

  • 1,758 Points 1k badge 2x thumb
Hi Pat,

Sure :)

Go to your auth provider and open the section "Common Request Parameters".
Then click on that rectangular icon (see screenshot) to open the menu and append a new object property to the request header and paste in the following:

Before the ":" paste in Authorization 
After the ":" paste in Bearer {{$Auth.Response.Body.access_token}}





Let me know if this works for you. Like I said I'm not a 100% sure if this resolves the issue you're having but it's worth a try.
If this doesn't work I will further investigate how exactly you need to configure this.

Cheers
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
That part I was able to do before without success. It's knowing how to troubleshoot this in the first place.

Put me in front of a snippet that's not working and I'm good to go, but this... I'm lost.
Photo of David Giger

David Giger

  • 1,758 Points 1k badge 2x thumb
Is there any reason why you chose "SAML 2.0 Bearer Assertion" as "Grant Type" instead of "Authorization Code"? That's the grant type which is also recommended by the tutorial setup.
And how is your Dynamics API setup (meaning did you set the token endpoint URLs, etc)?

Sorry for asking you those question but it's hard to exactly know where the issue is ;)
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Consider me the monkey in the control on this. I tried following the tutorial. Didn't work. Then I tried other combinations of flips and switches since that's worked for me in the past.

It would be better than someone who knows what they are doing actually do this or someone get on a GTM, Skype or Google Hangouts with me to assist. Please. :)