Sharepoint online List - REST api - unable to configure data source

Hi,

I went through the steps using Postman to make a successful Get REST api call to return List items. I was able to generate the Access Token with full permissions. I’m not able to get this to work as a Data Source. Without going into great detail, can someone please point me to an example of using a SP List as a data source?

Thank you in advance.

GET - https://myspo.sharepoint.com/sites/NIntexSolutions/pocs/_api/Web/Lists/getbytitle(‘PSH%20Package%20Pricing’)/items

Here are a few things to check. Do you have an Auth Provider created?

Authentication Provider

Create an Auth Provider (/ns/skuid/ui/datasources) and go to the Authentication Providers tab and create a new one. Match your Postman’s authentication setup as much as possible since it’s working there.

  • Auth method: OAuth 2.0 / OpenID
  • Provider type: Sharepoint Online
  • OAuth grant type: Match your Postman’s setup. Authorization Code is likely what you’ll use
  • Authorize Endpoint URL: https://{yoursite}.sharepoint.com/_layouts/15/OauthAuthorize.aspx *use your Postman url if it’s different
  • Token Endpoint URL: https://accounts.accesscontrol.windows.net/{yoursite}.onmicrosoft.com/tokens/OAuth/2 *use your Postman url if it’s different
  • Don’t forget to populate Client Id and Client Secret
    Save the new Auth Provider.

Data Source
Go back to the Data Source tab and create a new one with these settings

  • Type: REST
  • Auth Provider: the one you created
  • URL endpoint: https://myspo.sharepoint.com/sites/NIntexSolutions/pocs/_api

And if all of those things checked out, in your Skuid page, how are you setting up the model? I’d create a model connecting to the datasource with a GET method with this url /Web/Lists/getbytitle(%E2%80%98PSH%20Package%20Pricing%E2%80%99)/items

It’ll immediately try to ping that URL to get metadata, so have your dev console open with the network tab open ready to troubleshoot! The errors you get in the network tab will be super helpful to track down what might be going wrong.

Hope that helps!

1 Like

Thanks for the quick response, let me give this a try.