Reputation: 31
I have created Service principle in the Azure and in the Sharepoint online created the client id and secret.
When trying to create the linked service in azure data factory it is failed.
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: BadRequest, response is..
Please help here how I can give permission of service principle to SharePoint site.
Upvotes: 2
Views: 5476
Reputation: 16431
Just from the error message, it seams that it caused by the connection to oData service.
If your data store is located inside an on-premises network, an Azure virtual network, or Amazon Virtual Private Cloud, you need to configure a self-hosted integration runtime to connect to it.
Alternatively, if your data store is a managed cloud data service, you can use Azure integration runtime. If the access is restricted to IPs that are approved in the firewall rules, you can add Azure Integration Runtime IPs into the allow list.
For more information about the network security mechanisms and options supported by Data Factory, see Data access strategies.
Update:
Glad to hear the error is fixed now:
HTH.
Upvotes: 0
Reputation: 733
You need to provide the App permission to Sharepoint.
If you have Admin access to Sharepoint then you can provide access to Service Principal
If you need to do if programmatically then you can use below XML: <AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope="http://xxxxxxx" Right="Read" /> </AppPermissionRequests>
Upvotes: 2