question

Rubi8448-2098 avatar image
0 Votes"
Rubi8448-2098 asked KranthiPakala-MSFT commented

Unauthorized using Windows Authentication O Data source (Dynamics CRM API) in Azure Data Factory

1) Start an Edge Browser

2) Paste a Dynamics CRM link (in our case: https://xxxxxx.api.crm4.dynamics.com/api/data/v9.1 )

3) I can see the data collections which the API returns:

84830-image.png

4) Now start Azure Data Factory and click ‘Copy data’:

84865-image.png

5) Go to ‘Source’ – ‘Generic protocol’ and click button ‘New connection’ right on the screen.

Select ‘O Data:

84901-image.png

6) Enter the same URL used in Edge and provide an authentication type, user name and password. After that click 'Test connection’.

84902-image.png

The error message is: Failed to create odata connection to RequestUrl. Failed to get metadata of odata service, please check if service url and credential is correct and your application has permission to the resource. Expected status code: 200, actual status code: Unauthorized

The user is an AAD user and is admin in Dynamics CRM. Using Edge with this user is showing the user has enough permissions.

Why is the connection failing in ADF?


azure-data-factory
image.png (149.5 KiB)
image.png (297.5 KiB)
image.png (40.3 KiB)
image.png (76.5 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Rubi8448-2098,

Welcome to Microsoft Q&A forum and thanks for your query.

From the error message it seems like authentication issue. When you tried in Edge browser, what authentication is being used to establish the connection? In case if you haven't used any credentials in edge browser, the could you please try Anonymous authentication in ADF linked service and see if your test connection works fine? If that doesn't help, I would recommend you to please try it out in POSTMAN tool to test the windows authentication to make sure it is working as expected.

Do let us know how it goes.

Thank you

0 Votes 0 ·

As per the public documentation, it is suggested to provide the root URL of the OData service in Url of the linked servie and you can additionally configure authentication headers in authHeader property.

85216-image.png

Also would you please share the reason to use OData connector for Dynamic CRM while we are having dedicated ADF connector for Dynamics CRM?

85242-image.png

I would recommend trying the dedicated Dynamics CRM connector for better functionality and experience.

Do let us know how it goes.

Thank you


0 Votes 0 ·
image.png (56.7 KiB)
image.png (22.6 KiB)

Hi @Rubi8448-2098,

Just checking in to see if any of the above suggestion was helpful to resolve the issue. And, if you have any further query do let us know.

Thanks

0 Votes 0 ·
Show more comments

0 Answers