2

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.

3
  • Hi @abhishek, did you get any progresses? Commented Jan 22, 2021 at 1:57
  • Hi all, thank you for your time and response. Now issue is fixed. For fixed we have given the Azure application permission in site level on SharePoint side. Commented Jan 24, 2021 at 3:11
  • Hi @abhishek, glad to hear that! I updated it to the answer. If the answer is helpful for you, you can accept it as answer(( click on the check mark beside the answer to toggle it from greyed out to filled in.)). This can be beneficial to other community members. Thank you! Commented Jan 24, 2021 at 13:35

2 Answers 2

2

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>

Sign up to request clarification or add additional context in comments.

1 Comment

Hi @Abhishek : If my response helped you, can you please mark it as an answer so that we can have others from community to benefit from it :). Thanks !
0

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:

  • "Now issue is fixed. For fixed we have given the Azure application permission in site level on SharePoint side."

HTH.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.