question

DeeT-2558 avatar image
1 Vote"
DeeT-2558 asked HolparPeter-3393 answered

I am trying to create a linked service in Data Factory to Share point Online but i am getting connection error

Hi I am referring this document: https://docs.microsoft.com/en-us/azure/data-factory/connector-sharepoint-online-list and I am able to complete all the steps mentioned but when I test the connection I get this error:

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, response is : {"error":"invalid_request","error_description":"Token type is not allowed."}.

azure-data-factory
· 6
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 @DeeT-2558,

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

Could you please confirm if you are trying to copy data from SharePoint Online List (`Sharepoint Online list connector` - it supports copying data from SharePoint Online List but not file) or copy file from sharepoint online (HTTP connector to be used)? And also please confirm what is the Linked service type you have used?

I would also recommend you to please try POSTMAN to test the connection first before testing it in ADF. If you see the same issue with POSTMAN as well, then the error could be due to your app was not trusted. I think you might have missed some steps while granting SharePoint Online site permission to your registered application (AAD app). I would recommend to re-evaluate/follow the prerequisites once again.

58381-image.png

Could you please try and let us know how it goes with POSTMAN?

Thanks


0 Votes 0 ·
image.png (99.2 KiB)

Hi @DeeT-2558,

Following up to see if you have got a chance to see my previous comment? If so could you please confirm if you were able to test your scenario as mentioned in my previous comment?


Looking forward to your confirmation.

Thanks

0 Votes 0 ·

Hi,

Yes I am trying to trying to copy data from SharePoint Online List( Sharepoint Online list connector).

As per your recommendation I tested the connection on POSTMAN and it works fine there but when I test in ADF i still get the same error.


What could be the possible reason for that?




0 Votes 0 ·

Hi @DeeT-2558,

Thanks for your response. I tried to reproduce the error you are experiencing by having inappropriate config but no luck. I am getting a different error but if I configure correctly as per the steps mentioned in the document, Linked service test connection is working fine.

Could you please confirm if you have used the same AAD registered app ID and client secret to generate the bearer token which was used in your postman testing? The reason I wanted to check this is because if you are able to test successfully with same AAD registered app in POSTMAN then it should ideally work in ADF linked service unless there is a difference.

In the meantime I'll also reach out to internal team to get additional inputs on this issue.

Thanks

0 Votes 0 ·

Hi I tested the connection on Postman. I have used the same AAD registered app ID and client secret to generate the bearer token which was used in the postman testing.

60237-screenshot-2021-01-25-at-203637.png


0 Votes 0 ·

1 Answer

HolparPeter-3393 avatar image
0 Votes"
HolparPeter-3393 answered

https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs

Azure Access Control (ACS), a service of Azure Active Directory (Azure AD), has been retired on November 7, 2018. This retirement does not impact the SharePoint Add-in model, which uses the https://accounts.accesscontrol.windows.net hostname (which is not impacted by this retirement). For more information, see Impact of Azure Access Control retirement for SharePoint Add-ins. For new tenants, apps using an ACS app-only access token is disabled by default. We recommend using the Azure AD app-only model which is modern and more secure. But you can change the behavior by running ‘set-spotenant -DisableCustomAppAuthentication $false' (needs the latest SharePoint admin PowerShell).

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.