Sharepoint Auth Issue

edited August 21, 2018 in Questions
Hi Guys,

I'm attempting to connect to a Sharepoint Online site. I've diligently followed the guide (https://docs.skuid.com/latest/en/data/microsoft/sharepoint.html#sharepoint) a few times, however I can't make the auth work.


Everything seems like it is working, I log into Sharepoint with my credentials in the oauth popup, and then I get "Authentication Failed" in Skuid.

When I capture the redirect in Fiddler I can see the login prompt is redirecting to https://cpdev1-practifi-dev-ed--skuid.ap1.visual.force.com/apex/skuid__oauthcallback?error=server_er..., most interestingly specifying this in the querystring:

error_description=The remote server returned an error: (401) Unauthorized.&


Seems like I need to grant more access in Sharepoint, however it's not immediately obvious how one does this. Has anyone made the example in the guide work lately? Any feedback is much appreciated.

-Dan

Comments

  • Matthew LeahyMatthew Leahy ✭✭✭
    edited August 6, 2018
    Hi Dan,

    Let me see if I can help you get the Sharepoint data source working. I'll followup with you tomorrow with some questions. 

    Thanks,
    Matt
  • edited August 6, 2018
    Great. Thanks, Matthew.
  • Matthew LeahyMatthew Leahy ✭✭✭
    edited August 7, 2018
    Hi Dan,

    How did you configure Sharepoint? Can you share specifics on the setup (Team Site or Sub-Site, Permission Request XML).

    There will be some back and forth, if that is ok. 

    Thanks,
    Matt
  • edited August 13, 2018
    Hi Matthew,

    The Sharepoint site was spun up based on a developer account. I created a single top level team site. The permission request XML was exactly as specified on the tutorial page, reproduced below:
    <AppPermissionRequests>  <AppPermissionRequest  Scope="http://sharepoint/content/sitecollection"  Right="Write" />  
    </AppPermissionRequests>

    -Dan
  • Matthew LeahyMatthew Leahy ✭✭✭
    edited August 13, 2018
    Hey Dan,

    Couple of things to update and test. The items below are "in addition" to the Skuid docs.

    App Permissions Section

    You have already granted permissions for the new “SharePoint App” to access the top level site’s lists and libraries. Now we want to grant permissions for the new “SharePoint App” to access a specific sub-site’s lists and libraries (Team Site). Again, use appregnew.aspx in that site’s path.

    Navigate to 

    https://<CompanyName>.sharepoint.com/sites/<TeamSiteName>/_layouts/15/appinv.aspx

    Repeat same steps as with the top level site’s lists and libraries.

    Note: you may want to change the Permission Request XML. Valid options are Read, Write, Manage and Full Control.

    <AppPermissionRequests>
    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="Manage"/>
    </AppPermissionRequests>

    Let's move to the data source configuration for Sharepoint and edit the one you have already created.

    Update the "URL / Endpoint":

    Sub-site - collection:

    https://<CompanyName>.sharepoint.com/sites/<TeamSiteName>/_api

    Then click the "Refresh Metadata" button. May take a few minutes. 

    Let me know your results.

    Thanks,
    Matt
  • edited August 21, 2018
    Hi Matt,

    All good until I hit the sub-site collection step.

    I browse to https://practifidev.sharepoint.com/sites/practifiteam/_api and get 404 Not Found.

    -Dan

  • Matthew LeahyMatthew Leahy ✭✭✭
    edited August 21, 2018
    Hey Dan,

    Let me consult one of our resident Sharepoint users. Leaning towards a permission issue, but more discussion required on my end.

    Thank you for your patience.

    --Matt  
  • Matthew LeahyMatthew Leahy ✭✭✭
    edited August 21, 2018
    Dan,

    You are actually at a place where you can create a sample page against your Sharepoint data source. Please refer to the Skuid Documentation (https://docs.skuid.com/latest/en/guides/) for assistance.

    Let us know how the page building goes.

    Thanks,
    Matt
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!