Question

CRM api authentication issues


Trying to extract data via a CRM API. Stuck (401 errors for authentication in the FME logs) on our internal CRM api with FME. I can query the API using a web browser after authentication. I've also tried without success to authenticate with FME's ODATA reader with a similar authentication issue.

the URL example is:

https://MYSITE/api/data/v8.1/TABLE?

When login works in a web browser there is a redirect (an active directory account is used) i believe this is using OAuth2 authentication.

Any advice or hints would be appreciated. I have reviewed other posts on this form but have not been able to find a solution.

 

thanks for the help!


6 replies

Badge +2

Hi @barry,

Just to confirm, were you able to add the OAuth 2.0 Web Service in Tools > FME Options> Web Connections > Manage Services or is the 404 error only appearing in the translation log?

Helpful Resources:

Hi @barry,

Just to confirm, were you able to add the OAuth 2.0 Web Service in Tools > FME Options> Web Connections > Manage Services or is the 404 error only appearing in the translation log?

Helpful Resources:

No i was not; i did notice that option for the http caller but not in the odata reader. Thanks @chrisatsafe i will try to figure that out from your links. I'll look to the Microsoft dynamics 365 option for starters unless you can point me to the correct web service to use for active directly. Its actually CRM 2016's api that i'm trying to get at.

Badge +2

No i was not; i did notice that option for the http caller but not in the odata reader. Thanks @chrisatsafe i will try to figure that out from your links. I'll look to the Microsoft dynamics 365 option for starters unless you can point me to the correct web service to use for active directly. Its actually CRM 2016's api that i'm trying to get at.

Awesome, I'd start with the web service and see if you get the same login window when you enter the registered apps info (i.e. client id, secret, etc.). When you scroll to the bottom of the web services parameters you should see a Test button which will open an authentication window where you can enter your credentials.

Awesome, I'd start with the web service and see if you get the same login window when you enter the registered apps info (i.e. client id, secret, etc.). When you scroll to the bottom of the web services parameters you should see a Test button which will open an authentication window where you can enter your credentials.

ok so getting close; i figured out how to add the OAuth 2.0 web service and i can login, but its not clear to me how set up the parameters. Getting stuck here: After the authenticate i'm simply inside CRM in the popup window.

Badge +2

ok so getting close; i figured out how to add the OAuth 2.0 web service and i can login, but its not clear to me how set up the parameters. Getting stuck here: After the authenticate i'm simply inside CRM in the popup window.

Hmm, okay. I also just found a web connection for this on the hub: https://hub.safe.com/publishers/safe-lab/web-connections/microsoft-dynamics-365

There are steps on the hub page that mention what you need to have setup, might be worthwhile just checking the list and downloading the web connection to see if that does the trick!

Hmm, okay. I also just found a web connection for this on the hub: https://hub.safe.com/publishers/safe-lab/web-connections/microsoft-dynamics-365

There are steps on the hub page that mention what you need to have setup, might be worthwhile just checking the list and downloading the web connection to see if that does the trick!

Ya; its not 365 so that is not going to do it. I think my issue is with the oauth2 parameters. Is there any documentation or examples that could be provided to help me out here? I am able to login, but then is no different the using the CRM application via the web browser. I'm missing something for sure. thx again for your help so far!

Reply